Coverity Scan. Big Data Spotlight



Similar documents
COVERITY SCAN: 2013 OPEN SOURCE REPORT. Coverity Scan: 2013 Open Source Report

Hadoop Ecosystem Overview. CMSC 491 Hadoop-Based Distributed Computing Spring 2015 Adam Shook

HDP Hadoop From concept to deployment.

Implement Hadoop jobs to extract business value from large and varied data sets

Adobe Systems Incorporated

Peers Techno log ies Pv t. L td. HADOOP

Workshop on Hadoop with Big Data

Upcoming Announcements

Data Security in Hadoop

How To Scale Out Of A Nosql Database

FINAL DoIT v.4 PAYMENT CARD INDUSTRY DATA SECURITY STANDARDS APPLICATION DEVELOPMENT AND MAINTENANCE PROCEDURES

Qsoft Inc

Apache Hadoop: The Big Data Refinery

Infomatics. Big-Data and Hadoop Developer Training with Oracle WDP

HADOOP. Revised 10/19/2015

HDP Enabling the Modern Data Architecture

Hortonworks and ODP: Realizing the Future of Big Data, Now Manila, May 13, 2015

Talend Open Studio for Big Data. Release Notes 5.2.1

Smart (and safe) Lighting:

ArcGIS Server Security Threats & Best Practices David Cordes Michael Young

Magento Security and Vulnerabilities. Roman Stepanov

Dominik Wagenknecht Accenture

How To Understand And Understand The Security Of A Web Browser (For Web Users)

Cloudera Certified Developer for Apache Hadoop

White Paper: What You Need To Know About Hadoop

Hadoop implementation of MapReduce computational model. Ján Vaňo

ETHICAL HACKING APPLICATIO WIRELESS110 00NETWORK APPLICATION MOBILE MOBILE0001

Comprehensive Analytics on the Hortonworks Data Platform

Big Data Management and Security

CSE 590: Special Topics Course ( Supercomputing ) Lecture 10 ( MapReduce& Hadoop)

A Tour of the Zoo the Hadoop Ecosystem Prafulla Wani

Extending the Enterprise Data Warehouse with Hadoop Robert Lancaster. Nov 7, 2012

TRAINING PROGRAM ON BIGDATA/HADOOP

Big Data, Why All the Buzz? (Abridged) Anita Luthra, February 20, 2014

How To Test A Computer System On A Microsoft Powerbook 2.5 (Windows) (Windows 2) (Powerbook 2) And Powerbook (Windows 3) (For Windows) (Programmer) (Or

Complete Java Classes Hadoop Syllabus Contact No:

Introduction to Big data. Why Big data? Case Studies. Introduction to Hadoop. Understanding Features of Hadoop. Hadoop Architecture.

Cloud Security:Threats & Mitgations

Architectural patterns for building real time applications with Apache HBase. Andrew Purtell Committer and PMC, Apache HBase

White Paper: Hadoop for Intelligence Analysis

The evolution of database technology (II) Huibert Aalbers Senior Certified Executive IT Architect

Hadoop Job Oriented Training Agenda

Big Data Infrastructure at Spotify

You should have a working knowledge of the Microsoft Windows platform. A basic knowledge of programming is helpful but not required.

A bit about Hadoop. Luca Pireddu. March 9, CRS4Distributed Computing Group. (CRS4) Luca Pireddu March 9, / 18

Big data for the Masses The Unique Challenge of Big Data Integration

ITG Software Engineering

Open source software framework designed for storage and processing of large scale data on clusters of commodity hardware

project collects data from national events, both natural and manmade, to be stored and evaluated by

Hadoop Usage At Yahoo! Milind Bhandarkar

How to break in. Tecniche avanzate di pen testing in ambito Web Application, Internal Network and Social Engineering

Hadoop Ecosystem B Y R A H I M A.

SOLVING REAL AND BIG (DATA) PROBLEMS USING HADOOP. Eva Andreasson Cloudera

Hadoop Introduction coreservlets.com and Dima May coreservlets.com and Dima May

WEB SECURITY CONCERNS THAT WEB VULNERABILITY SCANNING CAN IDENTIFY

Intel HPC Distribution for Apache Hadoop* Software including Intel Enterprise Edition for Lustre* Software. SC13, November, 2013

Data Services Advisory

COURSE CONTENT Big Data and Hadoop Training

HADOOP VENDOR DISTRIBUTIONS THE WHY, THE WHO AND THE HOW? Guruprasad K.N. Enterprise Architect Wipro BOTWORKS

WEB SITE SECURITY. Jeff Aliber Verizon Digital Media Services

ESS event: Big Data in Official Statistics. Antonino Virgillito, Istat

A Brief Outline on Bigdata Hadoop

Big Data: Using ArcGIS with Apache Hadoop. Erik Hoel and Mike Park

The Big Data Ecosystem at LinkedIn. Presented by Zhongfang Zhuang

Is Drupal secure? A high-level perspective on web vulnerabilities, Drupal s solutions, and how to maintain site security

Lecture 10: HBase! Claudia Hauff (Web Information Systems)!

Case Study : 3 different hadoop cluster deployments

International Journal of Advancements in Research & Technology, Volume 3, Issue 2, February ISSN

Databricks. A Primer

elearning for Secure Application Development

BIG DATA TECHNOLOGY. Hadoop Ecosystem

Introduction to Big Data Training

Programming Hadoop 5-day, instructor-led BD-106. MapReduce Overview. Hadoop Overview

WHITE PAPER FORTIWEB WEB APPLICATION FIREWALL. Ensuring Compliance for PCI DSS 6.5 and 6.6

Manifest for Big Data Pig, Hive & Jaql

BIG DATA SERIES: HADOOP DEVELOPER TRAINING PROGRAM. An Overview

THE HADOOP DISTRIBUTED FILE SYSTEM

HBase A Comprehensive Introduction. James Chin, Zikai Wang Monday, March 14, 2011 CS 227 (Topics in Database Management) CIT 367

Modernizing Your Data Warehouse for Hadoop

Kenna Platform Security. A technical overview of the comprehensive security measures Kenna uses to protect your data

White Paper: Evaluating Big Data Analytical Capabilities For Government Use

How to Hadoop Without the Worry: Protecting Big Data at Scale

WHITE PAPER. Four Key Pillars To A Big Data Management Solution

Pentests more than just using the proper tools

Development. Resilient Software. Secure and. Mark S. Merkow Lakshmikanth Raghavan. CRC Press. Taylor& Francis Croup. Taylor St Francis Group,

Hadoop Submitted in partial fulfillment of the requirement for the award of degree of Bachelor of Technology in Computer Science

Getting Started with SandStorm NoSQL Benchmark

Testing Big data is one of the biggest

Pentests more than just using the proper tools

Bringing Big Data to People

IBM InfoSphere Guardium Data Activity Monitor for Hadoop-based systems

Getting Started with Hadoop. Raanan Dagan Paul Tibaldi

Cracking the Perimeter via Web Application Hacking. Zach Grace, CISSP, CEH January 17, Mega Conference

Self-service BI for big data applications using Apache Drill

Application Development. A Paradigm Shift

INTRODUCTION TO APACHE HADOOP MATTHIAS BRÄGER CERN GS-ASE

BIG DATA & HADOOP DEVELOPER TRAINING & CERTIFICATION

Lecture 32 Big Data. 1. Big Data problem 2. Why the excitement about big data 3. What is MapReduce 4. What is Hadoop 5. Get started with Hadoop

Protecting Your Organisation from Targeted Cyber Intrusion

Information Builders Mission & Value Proposition

Transcription:

Coverity Scan Big Data Spotlight

Coverity Scan Service The Coverity Scan service began as the largest public-private sector research project in the world focused on open source software quality and security. Initiated in 2006 with the U.S. Department of Homeland Security, Coverity now manages the project, providing our development testing technology as a free service to the open source community to help them build quality and security into their software development process. With almost 3,000 projects participating, the Coverity Scan service enables open source developers to scan or test their Java, C#, C and C++ code as it is written, flag critical quality and security defects that are difficult (if not impossible) to identify with other methods and manual reviews, and provide developers with actionable information to help them to quickly and efficiently fix the identified defects. More than 100,000 defects identified by the Coverity Scan service have been fixed since the inception of the program. The Rise of Big Data and the Internet of Things The number of big data related projects within the Coverity Scan service has seen tremendous growth in 2014. Fueling this growth has been the critical role that big data open source projects play in the Internet of Things (IoT). McKinsey Global Institute reports that the IoT business will deliver $6.2 trillion of revenue by 2025 and an explosion of data is expected to be generated in the process. To handle this data, organizations must be able to harvest, store and analyze it. We are extremely proud that many of the leading open source projects and technologies that enable the big data movement and support the IoT are part of the Coverity Scan service. The following is a sample of the big data projects currently in the service: Apache Accumulo Apache Argus Apache Cassandra Apache Cayenne Apache DataFu Apache Drill Apache Falcon Apache Flume A computer software project that developed a sorted, distributed key/value store based on the BigTable technology from Google. It is a system built on top of Apache Hadoop, Apache ZooKeeper, and Apache Thrift. A framework to enable, monitor and manage comprehensive data security across the Hadoop platform. An open source distributed database management system designed to handle large amounts of data across many commodity servers, providing high availability with no single point of failure. An open source persistence framework licensed under the Apache License, providing object-relational mapping (ORM) and remoting services. A collection of libraries for working with large-scale data in Hadoop and Pig. An open-source software framework that supports data-intensive distributed applications for interactive analysis of large-scale datasets. A data processing and management solution for Hadoop designed for data motion, coordination of data pipelines, lifecycle management, and data discovery. A distributed, reliable, and available service for efficiently collecting, aggregating, and moving large amounts of log data. 2

Apache HBase Apache Hadoop Apache Hive Apache Oozie Apache Optiq Apache Phoenix Apache Pig Apache Sqoop A non-relational (NoSQL) database that runs on top of the Hadoop Distributed File System (HDFS). An open-source software framework for storage and large-scale processing of datasets on clusters of commodity hardware. A data warehouse infrastructure built on top of Hadoop for providing data summarization, query, and analysis. A workflow scheduler system to manage Apache Hadoop jobs. A framework that allows efficient translation of queries involving heterogeneous and federated data. A SQL skin over HBase delivered as a client-embedded JDBC driver targeting low latency queries over HBase data. A platform for analyzing large data sets that consists of a high-level language for expressing data analysis programs, coupled with infrastructure for evaluating these programs. A tool designed for efficiently transferring bulk data between Apache Hadoop and structured datastores such as relational databases. A few of these projects such as Apache Hadoop and Apache HBase have participated in the Coverity Scan service for more than one year while many have only recently joined. We expect to see the defect density rates of all of these projects drop over time as they mature in their utilization of the service. Defect Density of Selected Leading Big Data Projects The following is the current defect density of some of the key big data projects: Item LOC Defect Density Apache Accumulo 384,920 4.96 Apache Argus 200,687 1.01 Apache Cassandra 262,818 1.61 Apache Cayenne 207,339 2.33 Apache DataFu 13,583 5.23 Apache Drill 252,952 1.31 Apache Falcon 27,116 1.88 Apache Flume 42,533 1.97 3

Defect Density of Selected Leading Big Data Projects Cont. Apache HBase 633,094 2.2 Apache Hadoop 1,231,941 1.68 Apache Hive 761,954 3.32 Apache Oozie 133,682 3.25 Apache Optiq 137,647 1.68 Apache Phoenix 98,539 1.39 Apache Pig 209,552 2.82 Apache Sqoop 68,115 2.99 In the 2013 Coverity Scan report, we saw the average defect density rate for Java projects was 2.72. Ten out of the 16 big data projects in our sample have a lower defect density rate than that average but many still remain higher than what we have seen in C, C++ code bases. There are several factors that impact the density level. First, the analysis algorithms for Java and C, C++ differ. The analysis we provide for the Coverity Scan service includes the popular FindBugs checkers, which are very useful. However, the FindBugs checkers generate large quantities of results, in particular in the areas of dodgy code, performance and bad practices. We ve recently introduced a new capability which will enable projects to turn off the FindBugs checkers so that can create some significant variability in defect density rates. Another factor to consider when assessing the defect density of the Java programs is the length of time the Coverity Scan service has been available to the projects. It is not uncommon to see higher defect density rates in the early stages of a project s participation in the Coverity Scan service, followed by a reduction in the defect density over time. Most Common Defects The following is the most common issues found in a sample of big data projects since they began participation in our service: Category Outstanding Eliminated Impact Null pointer dereferences 941 265 Medium FindBugs: Dodgy code 888 72 Low FindBugs: Bad practice 552 40 Low Concurrent data access violations 516 135 Medium 4

Most Common Defects (Cont.) FindBugs: Internationalization 403 45 Low FindBugs: Performance 248 27 Low Exceptional resource leaks 217 27 Low Resource leaks 173 160 High Code maintainability issues 134 0 Low FindBugs: Multithreaded correctness 104 23 Medium Control flow issues 75 11 Medium FindBugs: Correctness 70 7 Medium Integer handling issues 54 3 Medium Class hierarchy inconsistencies 49 7 Medium Incorrect expression 43 4 Medium API usage errors 37 8 Medium Possible Control Flow Issues 19 0 Low Error handling issues 17 4 Medium Data race undermines locking 16 0 High Medium impact security 13 0 Medium FindBugs: Malicious code vulnerability 11 0 Low Unreliable locking behavior 10 0 High Program hangs 4 4 Medium Possible Control flow issues 4 0 Low Performance inefficiencies 0 4 Low Grand Total 4594 845 5

The top three most commonly fixed issues were: null pointer dereferences, resource leaks and concurrent data access violations. These are three potentially very serious types of defects. The big data projects fixed almost 50% of the resource leaks which is consistent with the level we see in C/C++ projects. However, in the 2013 Scan report, of the Java resource leaks found, only 13% were addressed. It could be that because open source big data projects serve as fundamental technology to so many organizations, the projects are willing to invest in addressing these types of issues versus the dodgy code and performance defects we saw in our 2013 report. With the addition of Coverity Security Advisor to the service, we were able to find 95 OWASP Top 10 issues in big data projects. Given the sensitivity of these types of issues, we will not disclose the names of the projects in which we found the defects. It s imperative that open source projects closely examine all OWASP Top 10 issues to avoid possible exploitation. Projects should also closely analyze their projects to assess which components contain security sensitive components including authentication and authorization functions as well as cryptographic code. These components should be assessed by someone with security expertise to assess potential attack vectors. Item Description # of Issues Found A1 Injection 2 A2 Broken Authentication and Session Management 17 A3 Cross-site Scripting (XSS) 17 A4 Insecure Direct Object References 3 A5 Security Misconfiguration 1 A6 Sensitive Data Exposure 1 A7 Missing Function Level Access Control 0 A8 Cross-Site Request Forgery (CSRF) 54 A9 Using Components with Known Vulnerabilities NA A10 Unvalidated Redirects and Forwards 0 6

Apache Hadoop Apache Hadoop has made some steady progress in eliminating key defects since we profiled the project in the Coverity Scan 2013 Report, in which we reported the project had a defect density rate of 1.71. Since that time, they have reduced it to 1.67. We ve seen a large increase in the number of concurrent data access violations, null pointer dereferences and resource leaks that were eliminated. DEFECTS OUTSTANDING AND ELIMINATED BY IMPACT AS OF OCT. 2014 Category Outstanding Eliminated Impact FindBugs: Dodgy code 399 45 Low Concurrent data access violations 317 87 Medium Null pointer dereferences 242 181 Medium FindBugs: Internationalization 145 41 Low FindBugs: Bad practice 108 12 Low Exceptional resource leaks 48 7 Low Integer handling issues 32 1 Medium Resource leaks 23 110 High Incorrect expression 20 0 Medium FindBugs: Multithreaded correctness 18 5 Medium Class hierarchy inconsistencies 12 3 Medium FindBugs: Correctness 11 3 Medium Control flow issues 8 2 Medium API usage errors 8 1 Medium Data race undermines locking 7 0 High Unreliable locking behavior 7 0 High Medium impact security 7 0 Medium FindBugs: Performance 5 2 Low 7

Apache Hadoop (Cont.) Error handling issues 4 1 Medium Program hangs 2 1 Medium Performance inefficiencies 2 0 Low Total 1420 507 Defect Density: 1.67 One of the issues the Apache Hadoop team recently fixed through the Coverity Scan service was due to inconsistent locking when accessing a data member from multiple threads. When the HDFS (Hadoop Distributed File System) component adds a new storage location, it may call the format() method. That method accesses and modifies the datanodeuuid member without holding a lock. That same member is accessed in two other methods, both while holding a lock. This is good evidence that the member will be accessed from multiple threads at the same time, and the lack of locking in the format() method may result in datanodeuuid becoming corrupted when two threads access it at the same time. At line 439, we can see how datanodeuuid is accessed without holding a lock: 8

To fix the problem, the Hadoop team decided to replace the assignment to the datanodeuuid member with a call to the synchronized setdatanodeuuid() setter method. Since the setter is synchronized, all accesses to datanodeuuid are now protected by locks to avoid corruption: 9

The Apache Hadoop team also recently fixed a resource leak due to the inadvertent use of the wrong resource. In the following code snippet, notice how lines 736 and 737 create a BufferedReader() to read data from "file". However, instead of using "in" to read from the file, on line 739 a new FileInputStream() for "file" is used. The finally block at line 770 ensures that "in" is closed, but does not handle the FileInputStream actually used on line 739. 10

To address the problem, they read the lines from "in" rather than creating an unnecessary FileInputStream--ensuring that the finally block properly closes the necessary resources. 11

HBase Since our 2013 Scan report, The HBase project has added almost 200,000 lines of code to the project and lowered their defect density rate from 2.33 to 2.22. APACHE HBASE DEFECTS OUTSTANDING AND ELIMINATED BY IMPACT AS OF OCT. 2014 Category Outstanding Eliminated Impact Null pointer dereferences 116 75 Medium Concurrent data access violations 73 48 Medium FindBugs: Bad practice 57 21 Low FindBugs: Internationalization 54 3 Low Concurrent data access violations 48 73 Medium FindBugs: Multithreaded correctness 40 17 Medium Resource leaks 18 48 High Control flow issues 11 7 Medium FindBugs: Performance 8 12 Low Integer handling issues 6 1 Medium API usage errors 4 6 Medium Exceptional resource leaks 3 13 Low Class hierarchy inconsistencies 1 4 Medium FindBugs: Correctness 1 3 Medium Error handling issues 1 3 Medium Program hangs 1 3 Medium Incorrect expression 1 2 Medium 12

HBase (Cont.) Medium impact security 3 0 Medium FindBugs: Malicious code vulnerability 1 0 Low Possible Control flow issues 1 0 Low Performance inefficiencies 0 2 Low Total 440 298 Defect Density Rate: 2.22 Cassandra Apache Cassandra has made some steady progress in eliminating key defects since we profiled the project in our 2013 Scan report. In the Coverity Scan 2013 Report, we noted they had a defect density rate of 1.95 and since that time, they have lowered it to 1.61. They have continued to make excellent progress in eliminating null pointer dereferences and resource leaks. APACHE CASSANDRA-DEFECTS OUTSTANDING AND ELIMINATED BY IMPACT AS OF OCT. 2014 Category Outstanding Eliminated Impact Null pointer dereferences 60 25 Medium FindBugs: Bad practice 53 1 Low FindBugs: Dodgy code 42 3 Low FindBugs: Performance 21 10 Low FindBugs: Internationalization 18 1 Low Concurrent data access violations 14 0 Medium Resource leaks 11 2 High API usage errors 9 1 Medium FindBugs: Multithreaded correctness 8 1 Medium Control flow issues 4 2 Medium 13

Cassandra (Cont.) Medium impact security 3 Exceptional resource leaks 2 7 Low FindBugs: Correctness 2 1 Medium Integer handling issues 1 1 Medium Incorrect expression 1 1 Medium FindBugs: Malicious code vulnerability 1 0 Low Program Hangs 1 0 Medium Total 251 40 Defect Density: 1.61 An Interview with Don Bosco Durai Don Bosco Durai is a committer on Apache Argus, soon to be renamed Apache Ranger, which provides comprehensive security across the Hadoop platform. He is also an Enterprise Security Architect with Hortonworks. Each big data project has its own guidelines and processes but the following are Bosco s observations: Q: Why do you think you are able to achieve high levels of quality and security? A: Most projects have setup good guidelines and oversight. Each design and code commits are reviewed by peers and since there are lot more people monitoring and contributing, most issues are identified and resolved immediately. Q: What happens if you have a developer working on the project that submits code doesn t meet quality and security expectations? A: Since each commit request is required to pass automated test cases and is reviewed by peers, any sub-standard code is rejected or fixed before commit. Q: Do you have a set of best practices for security that you think would be beneficial for other open source projects to consider? A: Each project have their own guidelines and best practices. There are mentors for each project who have experience in open source projects and they ensure that proper policies and practices are set in place and followed. Q: Do you have people in formal roles to ensure the quality and security of the code? A: This varies project by project. Each project has committers, mentors, contributors, etc. There might not be a formal role for quality or security, but members volunteer as needed to ensure that committed code are safe and reliable. 14

Q: Can you describe how the Coverity Scan service fits into your release process? A: Human reviews are subject to inconsistency, having automated scans with Coverity helps identify issues early on and necessary action can be taken proactively. Q: Some of your projects have only been part of the Service for a short time. What has been your impression of the value that the service has provided your team so far? A: With the limited usage, the results have been pretty impressive. We feel it will greatly improve the quality of the projects. Q: What challenges do you face with regard to maintaining high quality secure code that are unique to open source and how do you overcome those challenges? A: Since there are no owners and everything is contributed by volunteers, it is difficult to enforce strict policies. We feel regular scanning of committed code will help identify problematic code and corrective actions can be proactively taken. Conclusion We applaud the early efforts of the big data projects in the service. IoT and big data have the power to transform lives and our economy. We are extremely pleased to see the commitment of these projects to address critical defects and taking the appropriate steps to deliver higher quality software to the market. There s a great deal riding on these foundational technologies and it is encouraging to see these projects are taking that responsibility extremely seriously. If you would like to register a new project, contribute to or observe an existing project, visit us at https://scan.coverity.com/ About Coverity Coverity, Inc., a Synopsys company (Nasdaq:SNPS), is a leading provider of software quality and security testing solutions. Coverity s award-winning development testing platform helps developers create and deliver better software, faster, by automatically testing source code for software defects that could lead to product crashes, unexpected behavior, security breaches or catastrophic system failure. The world s largest brands rely on Coverity to help ensure the quality, safety and security of their products and services. For more information, visit www.coverity.com, follow us on Twitter or check out our blog. 2014 Coverity, Inc. All rights reserved. Coverity, the Coverity logo and Coverity SAVE are registered trademarks of Coverity, Inc. in the U.S. and other countries. All other company and product names are the property of their respective owners. 15