Bug 1086460 - Ubuntu code audit results (blocking inclusion in Ubuntu Main repo)
Summary: Ubuntu code audit results (blocking inclusion in Ubuntu Main repo)
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: core
Version: 3.4.2
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
Assignee: Kaleb KEITHLEY
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1091677 1095324 1109180 1122290 1227808
TreeView+ depends on / blocked
 
Reported: 2014-04-11 01:21 UTC by Louis Zuckerman
Modified: 2015-12-01 16:45 UTC (History)
6 users (show)

Fixed In Version: glusterfs-3.4.5beta2
Clone Of:
: 1091677 (view as bug list)
Environment:
Last Closed: 2015-02-12 19:35:24 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1274247 0 None None None Never

Description Louis Zuckerman 2014-04-11 01:21:00 UTC
We pushed the Ubuntu Server team to consider GlusterFS for inclusion in the Main repository.  This is necessary for Ubuntu to build QEMU & Samba with GlusterFS support.  Part of the process was an audit of the code.  The auditor gave a NACK response for the Main Inclusion Request (MIR) and provided a bit of feedback in a comment on the MIR bug in Launchpad:

https://bugs.launchpad.net/ubuntu/+source/glusterfs/+bug/1274247/comments/14

Until we get GlusterFS in Ubuntu Main the only way for people using Ubuntu to get QEMU or Samba with GlusterFS support will be to install from a community maintained PPA.

Thank you,

Louis Zuckerman

Comment 1 Lalatendu Mohanty 2014-04-25 19:02:44 UTC
Changing the Severity and Priority to high as this is stopping gluster from getting in to Ubuntu Main.

Comment 2 Lalatendu Mohanty 2014-04-26 17:06:24 UTC
Copying the Cppcheck errors, from the external bug

[api/src/glfs-fops.c:700]: (error) Possible null pointer dereference: gio
[api/src/glfs-fops.c:702]: (error) Possible null pointer dereference: frame
[rpc/rpc-transport/rdma/src/rdma.c:3074]: (error) Address of local auto-variable assigned to a function parameter.
[xlators/cluster/afr/src/afr-inode-write.c:375]: (error) Possible null pointer dereference: frame
[xlators/cluster/afr/src/afr-self-heal-common.c:1522]: (error) Possible null pointer dereference: local
[xlators/cluster/dht/src/dht-rebalance.c:1574]: (error) Possible null pointer dereference: ctx
[xlators/features/marker/utils/src/gsyncd.c:99]: (error) Memory leak: str
[xlators/features/marker/utils/src/gsyncd.c:354]: (error) Memory leak: argv
[xlators/cluster/stripe/src/stripe.c:4407]: (error) Possible null pointer dereference: local
[xlators/mgmt/glusterd/src/glusterd-mountbroker.c:675]: (error) Possible null pointer dereference: cookieswitch
[xlators/mgmt/glusterd/src/glusterd-mountbroker.c:677]: (error) Possible null pointer dereference: cookieswitch
[xlators/mgmt/glusterd/src/glusterd-replace-brick.c:924]: (error) Resource leak: file
[xlators/mgmt/glusterd/src/glusterd-replace-brick.c:1008]: (error) Resource leak: file
[xlators/mgmt/glusterd/src/glusterd-sm.c:248]: (error) Possible null pointer dereference: new_ev_ctx
[xlators/mgmt/glusterd/src/glusterd-store.c:1250]: (error) Possible null pointer dereference: handle
[xlators/mount/fuse/src/fuse-bridge.c:4432]: (error) Uninitialized variable: finh
[xlators/mgmt/glusterd/src/glusterd-utils.c:4272]: (error) Possible null pointer dereference: this
[xlators/mgmt/glusterd/src/glusterd-utils.c:5113]: (error) Possible null pointer dereference: this
[xlators/nfs/server/src/nlm4.c:1176]: (error) Possible null pointer dereference: fde
[xlators/performance/quick-read/src/quick-read.c:585]: (error) Possible null pointer dereference: iobuf
[xlators/mount/fuse/src/fuse-bridge.c:2927]: (error) Possible null pointer dereference: state
[xlators/mount/fuse/src/fuse-bridge.c:3226]: (error) Possible null pointer dereference: state
[xlators/storage/bd_map/src/bd_map.c:1504]: (error) Possible null pointer dereference: bd_fd
[xlators/storage/bd_map/src/bd_map.c:1728]: (error) Possible null pointer dereference: n_entry
[xlators/storage/bd_map/src/bd_map.c:1741]: (error) Possible null pointer dereference: n_entry

Comment 3 Raghavendra Talur 2014-04-28 08:54:43 UTC
cppcheck errors:

gfapi - 2
1. [api/src/glfs-fops.c:700]: (error) Possible null pointer dereference: gio - fixed in master by commit f9162911e85f95fa2a10d4b70d3f09876bd15adb by lala
2. [api/src/glfs-fops.c:702]: (error) Possible null pointer dereference: frame - fixed in master by commit f9162911e85f95fa2a10d4b70d3f09876bd15adb by lala
Need to backport to 3.4?


remaining errors to check:

rdma - 1
afr - 2
dht -1
marker -2 
glusterd - 8
fuse - 3
bd_map - 3
quick read - 1 
nlm4 - 1

Comment 4 Anand Avati 2014-04-28 18:30:46 UTC
REVIEW: http://review.gluster.org/7583 (core: fix Ubuntu code audit (cppcheck) results) posted (#1) for review on release-3.4 by Kaleb KEITHLEY (kkeithle)

Comment 5 Anand Avati 2014-04-28 19:07:24 UTC
REVIEW: http://review.gluster.org/7583 (core: fix Ubuntu code audit (cppcheck) results) posted (#2) for review on release-3.4 by Kaleb KEITHLEY (kkeithle)

Comment 6 Anand Avati 2014-04-28 19:10:24 UTC
REVIEW: http://review.gluster.org/7583 (core: fix Ubuntu code audit (cppcheck) results) posted (#3) for review on release-3.4 by Kaleb KEITHLEY (kkeithle)

Comment 7 Anand Avati 2014-05-07 14:51:38 UTC
REVIEW: http://review.gluster.org/7583 (core: fix Ubuntu code audit (cppcheck) results) posted (#4) for review on release-3.4 by Kaleb KEITHLEY (kkeithle)

Comment 8 Anand Avati 2014-05-08 11:54:24 UTC
REVIEW: http://review.gluster.org/7583 (core: fix Ubuntu code audit (cppcheck) results) posted (#5) for review on release-3.4 by Kaleb KEITHLEY (kkeithle)

Comment 9 Anand Avati 2014-05-08 16:45:32 UTC
REVIEW: http://review.gluster.org/7583 (core: fix Ubuntu code audit (cppcheck) results) posted (#6) for review on release-3.4 by Kaleb KEITHLEY (kkeithle)

Comment 10 Anand Avati 2014-05-09 18:16:14 UTC
REVIEW: http://review.gluster.org/7583 (core: fix Ubuntu code audit (cppcheck) results) posted (#7) for review on release-3.4 by Kaleb KEITHLEY (kkeithle)

Comment 11 Anand Avati 2014-05-15 13:27:32 UTC
REVIEW: http://review.gluster.org/7583 (core: fix Ubuntu code audit (cppcheck) results) posted (#8) for review on release-3.4 by Kaleb KEITHLEY (kkeithle)

Comment 12 Anand Avati 2014-05-15 18:30:15 UTC
REVIEW: http://review.gluster.org/7583 (core: fix Ubuntu code audit (cppcheck) results) posted (#9) for review on release-3.4 by Kaleb KEITHLEY (kkeithle)

Comment 13 Anand Avati 2014-05-23 11:31:26 UTC
REVIEW: http://review.gluster.org/7583 (core: fix Ubuntu code audit (cppcheck) results) posted (#10) for review on release-3.4 by Kaleb KEITHLEY (kkeithle)

Comment 14 Anand Avati 2014-05-23 11:41:42 UTC
REVIEW: http://review.gluster.org/7583 (core: fix Ubuntu code audit (cppcheck) results) posted (#11) for review on release-3.4 by Kaleb KEITHLEY (kkeithle)

Comment 15 Anand Avati 2014-05-25 10:52:09 UTC
COMMIT: http://review.gluster.org/7583 committed in release-3.4 by Kaleb KEITHLEY (kkeithle) 
------
commit d5e317718f4137431c3996ac5f38e9226620e760
Author: Kaleb S. KEITHLEY <kkeithle>
Date:   Mon Apr 28 14:25:09 2014 -0400

    core: fix Ubuntu code audit (cppcheck) results
    
    These block inclusion in Ubuntu Main repo.
    
    AFAICT these are false positives:
    
    [rpc/rpc-transport/rdma/src/rdma.c:3074]: (error) Address of local auto-variable assigned to a function parameter.
    [xlators/features/marker/utils/src/gsyncd.c:99]: (error) Memory leak: str
    [xlators/features/marker/utils/src/gsyncd.c:354]: (error) Memory leak: argv
    [xlators/nfs/server/src/nlm4.c:1176]: (error) Possible null pointer dereference: fde
    
    The remainder are fixed with this change-set:
    
    [api/src/glfs-fops.c:700]: (error) Possible null pointer dereference: gio
    [api/src/glfs-fops.c:702]: (error) Possible null pointer dereference: frame
    [xlators/cluster/afr/src/afr-inode-write.c:375]: (error) Possible null pointer dereference: frame
    [xlators/cluster/afr/src/afr-self-heal-common.c:1522]: (error) Possible null pointer dereference: local
    [xlators/cluster/dht/src/dht-rebalance.c:1574]: (error) Possible null pointer dereference: ctx
    [xlators/cluster/stripe/src/stripe.c:4407]: (error) Possible null pointer dereference: local
    [xlators/mgmt/glusterd/src/glusterd-mountbroker.c:675]: (error) Possible null pointer dereference: cookieswitch
    [xlators/mgmt/glusterd/src/glusterd-mountbroker.c:677]: (error) Possible null pointer dereference: cookieswitch
    [xlators/mgmt/glusterd/src/glusterd-replace-brick.c:924]: (error) Resource leak: file
    [xlators/mgmt/glusterd/src/glusterd-replace-brick.c:1008]: (error) Resource leak: file
    [xlators/mgmt/glusterd/src/glusterd-sm.c:248]: (error) Possible null pointer dereference: new_ev_ctx
    [xlators/mgmt/glusterd/src/glusterd-store.c:1250]: (error) Possible null pointer dereference: handle
    [xlators/mgmt/glusterd/src/glusterd-utils.c:4272]: (error) Possible null pointer dereference: this
    [xlators/mgmt/glusterd/src/glusterd-utils.c:5113]: (error) Possible null pointer dereference: this
    [xlators/mount/fuse/src/fuse-bridge.c:4432]: (error) Uninitialized variable: finh
    [xlators/mount/fuse/src/fuse-bridge.c:2927]: (error) Possible null pointer dereference: state
    [xlators/mount/fuse/src/fuse-bridge.c:3226]: (error) Possible null pointer dereference: state
    [xlators/storage/bd_map/src/bd_map.c:1504]: (error) Possible null pointer dereference: bd_fd
    [xlators/storage/bd_map/src/bd_map.c:1728]: (error) Possible null pointer dereference: n_entry
    [xlators/storage/bd_map/src/bd_map.c:1741]: (error) Possible null pointer dereference: n_entry
    [xlators/performance/quick-read/src/quick-read.c:585]: (error) Possible null pointer dereference: iobuf
    
    rerunning cppcheck --force afterwards:
    
    Test code, don't care:
    [extras/test/test-ffop.c:27]: (error) Buffer overrun possible for long command line arguments.
    
    False positive after fix
    [xlators/cluster/stripe/src/stripe.c:4407]: (error) Possible null pointer dereference: local
    
    Still false positive:
    [xlators/features/marker/utils/src/gsyncd.c:354]: (error) Memory leak: argv
    [xlators/nfs/server/src/nlm4.c:1176]: (error) Possible null pointer dereference: fde
    
    Not built, don't care:
    [xlators/cluster/ha/src/ha.c:2699]: (error) Possible null pointer dereference: priv
    
    Change-Id: I1fb849e9c042d3a3701cb05121d413e58e73d505
    BUG: 1086460
    Signed-off-by: Kaleb S. KEITHLEY <kkeithle>
    Reviewed-on: http://review.gluster.org/7583
    Reviewed-by: Vijay Bellur <vbellur>
    Tested-by: Gluster Build System <jenkins.com>


Note You need to log in before you can comment on or make changes to this bug.