EGEE-III INFSO-RI-222667 Enabling Grids for E-sciencE www.eu-egee.org EGEE and gLite are registered trademarks PSNC – status presentation Rafał Lichwała,

Slides:



Advertisements
Similar presentations
Examining the Code [Reading assignment: Chapter 6, pp ]
Advertisements

MSF Testing Introduction Functional Testing Performance Testing.
EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Regional Operations Dashboard Workplan Cyril.
CVSQL 2 The Design. System Overview System Components CVSQL Server –Three network interfaces –Modular data source provider framework –Decoupled SQL parsing.
Unit Testing & Defensive Programming. F-22 Raptor Fighter.
PHP Security.
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks gLite Release Process Maria Alandes Pradillo.
EGEE-II INFSO-RI Enabling Grids for E-sciencE PSNC work status Gerard Frankowski, Rafał Lichwała Poznań Supercomputing.
Programming. What is a Program ? Sets of instructions that get the computer to do something Instructions are translated, eventually, to machine language.
Computer Security and Penetration Testing
EMI INFSO-RI SA2 - Quality Assurance Alberto Aimar (CERN) SA2 Leader EMI First EC Review 22 June 2011, Brussels.
EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks What GGUS can do for you JRA1 All hands.
EGEE is a project funded by the European Union under contract IST Testing processes Leanne Guy Testing activity manager JRA1 All hands meeting,
EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Spyros Kopsidas Center for Research and.
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks gLite IPv6 compliance project tests Further.
EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks perfSONAR deployment over Spanish LHC Tier.
A DΙgital Library Infrastructure on Grid EΝabled Technology Release Beta Deployment Testing Plans Pedro Andrade
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Voms & Voms-admin report Vincenzo Ciaschini.
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Extensions to the ETICS Build System Client.
EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Middleware Deployment and Support in EGEE.
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks JRA1 summary Claudio Grandi EGEE-II JRA1.
INFSO-RI Enabling Grids for E-sciencE Strategy for gLite multi-platform support Author:Eamonn Kenny Meeting:SA3 All Hands Meeting.
INFSO-RI Enabling Grids for E-sciencE SCDB C. Loomis / Michel Jouvin (LAL-Orsay) Quattor Tutorial LCG T2 Workshop June 16, 2006.
EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks SA2 Quality Plan for EGEE III Geneviève.
Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Usage of virtualization in gLite certification Andreas Unterkircher.
EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Stuart Kenny and Stephen Childs Trinity.
EGEE-II INFSO-RI Enabling Grids for E-sciencE The GILDA training infrastructure.
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks IPv6 test methodology Mathieu Goutelle (CNRS.
INFSO-RI Enabling Grids for E-sciencE Information and Monitoring Status and Plans Plzeň, 10 July 2006 Steve Fisher/RAL.
EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Grid Web Portal for Chemists M. Sterzel,
EGEE-III INFSO-RI Enabling Grids for E-sciencE Ricardo Rocha CERN (IT/GS) EGEE’08, September 2008, Istanbul, TURKEY Experiment.
EMI INFSO-RI SA2: Quality Assurance Platforms for EMI 2 Andres Abad Rodriguez SA2.4 EMI All Hands Meeting May 30 th -June 1 ST, Lund (Sweden) Platforms.
EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Using GStat 2.0 for Information Validation.
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks The future of the gLite release process Oliver.
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks New Authorization Service Christoph Witzig,
SharePoint Online Migration API and Improvements
EGEE-II INFSO-RI Enabling Grids for E-sciencE YAIM Overview MiMOS Grid tutorial HungChe, ASGC OPS Team.
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Update Authorization Service Christoph Witzig,
EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks User traceability and log analysis tools.
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks SA3 partner collaboration tasks & process.
EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Xavier Jeannin (CNRS/UREC Paris, FR) 24.
EGEE-III INFSO-RI Enabling Grids for E-sciencE SA3 All Hands Meeting 'Cluster of Competence' Experience SA3 INFN Cyprus May 7th-8th.
EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Programming with the DRMAA OGF Standard.
EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Middleware Update Maria Alandes Pradillo.
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks GSI with OpenSSL Vincenzo Ciaschini EGEE-3.
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Developing YAIM modules for Sun Grid Engine.
INFSO-RI ETICS Local Setup Experiences A Case Study for Installation at Customers Location 4th. All Hands MeetingUwe Müller-Wilm VEGA Bologna, Nov.
Announcements You will receive your scores back for Assignment 2 this week. You will have an opportunity to correct your code and resubmit it for partial.
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks gLite configuration (plans) Robert Harakaly.
EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Patch Preparation SA3 All Hands Meeting.
INFSO-RI Enabling Grids for E-sciencE gLite Test and Certification Effort Nick Thackray CERN.
EGEE-II INFSO-RI Enabling Grids for E-sciencE Data Management cluster summary David Smith JRA1 All Hands meeting, Catania, 7 March.
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks VOMS & Reliability Vincenzo Ciaschini & Andrea.
Defensive Programming. Good programming practices that protect you from your own programming mistakes, as well as those of others – Assertions – Parameter.
EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Implementing product teams Oliver Keeble.
EGEE-III INFSO-RI Enabling Grids for E-sciencE JRA1 and SA3 All Hands Meeting December 2009, CERN, Geneva Product Teams –
Enabling Grids for E-sciencE EGEE-III-INFSO-RI EGEE and gLite are registered trademarks Francesco Giacomini JRA1 Activity Leader.
EMI INFSO-RI SA2: Quality Assurance Status Report Alberto Aimar(SA2) SA2 Leader EMI First EC Review 22 June 2011, Brussels.
EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks The Dashboard for Operations Cyril L’Orphelin.
EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarksEGEE-III INFSO-RI MPI on the grid:
EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Towards an Information System Product Team.
INFSO-RI Enabling Grids for E-sciencE Padova site report Massimo Sgaravatto On behalf of the JRA1 IT-CZ Padova group.
INFSO-RI Enabling Grids for E-sciencE GUMS vs. LCMAPS Oscar Koeroo.
EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks GOCDB4 Gilles Mathieu, RAL-STFC, UK An introduction.
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks CREAM: current status and next steps EGEE-JRA1.
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Argus gLite Authorization Service Workplan.
Content Coverity Static Analysis Use cases of Coverity Examples
Architecture Review 10/11/2004
Introduction to Static Analyzer
Presentation transcript:

EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks PSNC – status presentation Rafał Lichwała, Gerard Frankowski SA3 All Hands Meeting – UCY, Cyprus,

Enabling Grids for E-sciencE EGEE-III INFSO-RI SA3 All Hands Meeting - UCY, Cyprus, Security Porting Rafał Lichwała, PSNC Supercomputing Department

Enabling Grids for E-sciencE EGEE-III INFSO-RI SA3 All Hands Meeting - UCY, Cyprus, What has been done gLite packages porting to x86_64 Debian platform is our main task Porting gLite WN packages on Debian 4 x84_64 platform - done! –torquemaui - Success rate: 100% (3/3)‏ –VDT - Success rate: 100% (14/14)‏ –deps - Success rate: 100% (19/19)‏ –Basic - Success rate: 100% (12/12)‏ –VOMS - Success rate: 100% (13/13)‏ –DM - Success rate: 100% (19/19)‏ –gfal - Success rate: 100% (25/25)‏ –WN Success rate: 100% (59/59) Detailed reports available on:

Enabling Grids for E-sciencE EGEE-III INFSO-RI SA3 All Hands Meeting - UCY, Cyprus, Current work and future plans Currently we are focusing on porting UI packages for Debian 4 (current success rate: 93% [114/122]) We also plan to prepare porting WN for Debian 5 – first steps already done: –a proper virtual machine with Debian 5 has been prepared and ETICS installed –package external dependencies for deb5 x86_64 have been prepared –a new platform debian5 x86_64 has been registered in ETICS –building first packages on Debian 5  some issues still in progress... .deb packages temporary disabled (.tar only) - VDT bulit in 100%

Enabling Grids for E-sciencE EGEE-III INFSO-RI SA3 All Hands Meeting - UCY, Cyprus, Daily porting issues building lcmaps –problem with two flex libraries: libfl.a and libfl_pic.a –problem fixed by changing symbolic link to the library with -fpic flag building amga-serwer –cannot convert 'SQLINTEGER*' to 'SQLLEN*' –problem fixed - details reported in savannah building WN-lastest-VDT (VDT )‏ –"globus.location" problem in configuration –fixed - details reported in savannah –missing libregexp-java installed building org.glite.lb.client –problem with missing libexpat.la –fixed by preparing new expat with missing libraries

Enabling Grids for E-sciencE EGEE-III INFSO-RI SA3 All Hands Meeting - UCY, Cyprus, Savannah and GGUS reporting Savannah bug items: – – – – GGUS problems raised: –

Enabling Grids for E-sciencE EGEE-III INFSO-RI SA3 All Hands Meeting - UCY, Cyprus, Security (Hydra and SCAS source code analysis) Gerard Frankowski, PSNC Security Team

Enabling Grids for E-sciencE EGEE-III INFSO-RI SA3 All Hands Meeting - UCY, Cyprus, Hydra – introduction Hydra –encrypted file storage solution –encryption file key is split and distributed in Hydra Keystores –the key may be reconstructed from a subset of key pieces The structure and the versions investigated –the server  written in Java  version from the CVS  manual source code review supported with findbugs and pmd –the client  written in C  version from the CVS  manual source code review supported with cppcheck and RATS

Enabling Grids for E-sciencE EGEE-III INFSO-RI SA3 All Hands Meeting - UCY, Cyprus, Hydra – the service General –Quite a good work, but SQL Injections possible –Java protects from buffer overflows etc. –Some minor resource leaks –A number of non-security related remarks Report written Todo –penetration tests with access to the service  will additionally verify several issues pointed in the report  a „fresh” person takes care of the pentests

Enabling Grids for E-sciencE EGEE-III INFSO-RI SA3 All Hands Meeting - UCY, Cyprus, Hydra – the service SQL Injection –The methods (e.g. MySQLSchemaHelper.java class) do not check the values of parameters passed to the prepareStatement method of a connection object –Even if the external environment assures that the values are ok, (which will be checked during the pentests), this class may be reused... Not good // Initiate the table creation sql string String sqlNewTable = "CREATE TABLE " + schemaName + " (entry_id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, "; Better String sqlNewTable = "CREATE TABLE " + validateSQL(schemaName) + " (entry_id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, ";

Enabling Grids for E-sciencE EGEE-III INFSO-RI SA3 All Hands Meeting - UCY, Cyprus, Hydra – the service Selected recommendations –Please filter internally every parameter that builds an SQL query –Please remember to treat every single external source of data as potentially malicious, including e.g. the local database output –Remove any excess functionality and not used variables –Every output path from a method should assure that each allocated resource is released before the control is returned to the calling method –Please review the way of using exceptions. Avoid the situations where a method unnecessarily catches RuntimeExceptions

Enabling Grids for E-sciencE EGEE-III INFSO-RI SA3 All Hands Meeting - UCY, Cyprus, Hydra – the client General –The analyzed code does not contain direct big security holes... –...but uses some practices that may easily cause them!  using of unrecommended C functions like strcpy()  sizes of local buffers defined locally as numbers (but reasonably) –Too little data filtering of the input parameters of cmd line tools  library calls could not be checked –A single case of not verifying malloc() return value –Race conditions Report written Todo –Take a look at the security of the key pieces in memory

Enabling Grids for E-sciencE EGEE-III INFSO-RI SA3 All Hands Meeting - UCY, Cyprus, Hydra – the client An example of potentially insufficient data filtlering –eds.decrypt.c, function main() 87: id = argv[optind++]; Where does id go then? –glite_eds_decrypt_init(id, &error) [eds-simple.c: 731] –glite_eds_init(id, &key, &iv, &type, error); [eds-simple.c: 552] –glite_eds_get_metadata(id, &hex_key, &hex_iv, &cipher_name, &keyinfo, error) [eds-simple.c: 448] –glite_eds_get_metadata_single(endpoints[i], id, &data, &err) [definition: eds-simple.c: 238] –glite_metadata_getAttributes(ctx, id, attrs_count, attrs, &result_cnt) [metadata-simple-api.c:711] –soap_strdup(ctx->soap, item) [?], or –soap_call_metadata__getAttributes(ctx->soap, ctx->endpoint, NULL, sitem, &req, &resp) [?]

Enabling Grids for E-sciencE EGEE-III INFSO-RI SA3 All Hands Meeting - UCY, Cyprus, Hydra – the client An example of a potential race condition –metadata-simple-api.c, function is_ctx_ok() 205: if (getenv(GLITE_METADATA_SD_ENV)) 206: ret = _glite_catalog_init_endpoint(ctx, metadata_namespaces, 207: getenv(GLITE_METADATA_SD_ENV)); Issues –What happens if between the getenv() calls the processor is switched to another task and before it is returned, someone changes or deletes the GLITE_METADATA_SD_ENV variable? –There is no filtering of all, environment variables are potentially malicious –Is it optimal to call getenv() twice? Will the compiler optimize the source? Always?

Enabling Grids for E-sciencE EGEE-III INFSO-RI SA3 All Hands Meeting - UCY, Cyprus, Hydra – the client Selected recommendations –Please implement filtering the input parameters, addressing literally every parameter that is not a pure option (e.g. filenames) – please check its size and verify also the format –Please consider migrating from C functions considered as dangerous (like strcpy or sprintf to their “n” versions) –Please consider applying defensive programming rules, e.g.:  Verify if every pointer passed to every function is not NULL (unless it is acceptable)  Verify the values of all parameters that the users have control over (i.e. environment variables and contents of the files)  Do not use numeric values for the definition of local buffers sizes, but rather defined constants like MAX_BUF_LEN or MAX_ERROR_LEN, that are consistently applied throughout the code.

Enabling Grids for E-sciencE EGEE-III INFSO-RI SA3 All Hands Meeting - UCY, Cyprus, SCAS – introduction SCAS –Site Central Authorization Service –a Web Service that allows client programs to query for an authorization decision based upon user credentials The structure and the packages investigated –the service  written in C  org.glite.security.scas from the CVS  manual source code review supported with cppcheck, RATS and flawfinder –the client & plugins  written in C  org.glite.security.lcmaps-plugins-scas-client from the CVS  manual source code review supported with cppcheck and RATS

Enabling Grids for E-sciencE EGEE-III INFSO-RI SA3 All Hands Meeting - UCY, Cyprus, SCAS – test methodology A test plan –2 persons –person A investigates the service thoroughly (manual code review and scanners) while the person B analyzes the client & plugins in the same manner –then they switch to the other module and make only a short review Two approaches to tests with tools: –scan-first:  scan the code, look at the potential issues and eliminate false positives  read the rest of the code –read-first:  read the whole code and select potential threats  scan the whole code and look if you were able to notice all threats

Enabling Grids for E-sciencE EGEE-III INFSO-RI SA3 All Hands Meeting - UCY, Cyprus, SCAS – current status Source code tests –client and plugins: identified scanner output, the code is being reviewed if they are not false positives –service: the code is being read –a brief analysis on security of XACML was prepared Report: in the background, currently a sketch Necessary effort: ca. 80 hours In June we can start another module –June (very busy): learning the module –July: tests

Enabling Grids for E-sciencE EGEE-III INFSO-RI SA3 All Hands Meeting - UCY, Cyprus, Questions? Thank you! Rafał Lichwała Gerard Frankowski