Bug 2144829

Summary: nfs4_getfacl: Initialize acl pointer to NULL
Product: Red Hat Enterprise Linux 9 Reporter: Steve Dickson <steved>
Component: nfs4-acl-toolsAssignee: Steve Dickson <steved>
Status: CLOSED ERRATA QA Contact: Yongcheng Yang <yoyang>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.3CC: xzhou
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: nfs4-acl-tools-0.4.2-2.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-11-07 08:55:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Steve Dickson 2022-11-22 13:11:18 UTC
Description of problem:

commit ea0d882fa8c226ac27be4651f9550aa17d75462a 
Author: Steve Dickson <steved>
Date:   Mon Nov 21 14:07:58 2022 -0500

    nfs4_getfacl: Initialize acl pointer to NULL
    
    nfs4_getfacl.c: scope_hint: In function 'print_acl_from_path'
    nfs4_getfacl.c:168:17: warning[-Wmaybe-uninitialized]:
        'acl' may be used uninitialized in this function

Comment 15 Yongcheng Yang 2023-06-06 06:43:47 UTC
[root@hp-dl385g7-01-vm-03 ~]# rpm -q nfs4-acl-tools
nfs4-acl-tools-0.4.2-0.el9.x86_64
[root@hp-dl385g7-01-vm-03 ~]# rpm -Uvh nfs4-acl-tools-0.4.2-1.el9.x86_64.rpm
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...
   1:nfs4-acl-tools-0.4.2-1.el9       ################################# [ 50%]
Cleaning up / removing...
   2:nfs4-acl-tools-0.4.2-0.el9       ################################# [100%]
[root@hp-dl385g7-01-vm-03 ~]# rpm -q nfs4-acl-tools
nfs4-acl-tools-0.4.2-1.el9.x86_64

# Simple test with the xfstests suite:
[root@hp-dl385g7-01-vm-03 xfstests]# ./check -nfs -g nfs4_acl
FSTYP         -- nfs
PLATFORM      -- Linux/x86_64 hp-dl385g7-01-vm-03 5.14.0-319.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Fri May 26 17:01:24 EDT 2023
MKFS_OPTIONS  -- localhost:/export_test_s
MOUNT_OPTIONS -- -o context=system_u:object_r:root_t:s0 localhost:/export_test_s /mnt_test_s

nfs/001 5s ...  5s
Ran: nfs/001
Passed all 1 tests

[root@hp-dl385g7-01-vm-03 xfstests]# rpm -q nfs4-acl-tools
nfs4-acl-tools-0.4.2-1.el9.x86_64

Comment 16 Yongcheng Yang 2023-06-06 14:10:20 UTC
Re-verified with the newer build nfs4-acl-tools-0.4.2-2.el9:

[root@hp-dl385g7-01-vm-03 xfstests]# ./check -nfs -g nfs4_acl
FSTYP         -- nfs
PLATFORM      -- Linux/x86_64 hp-dl385g7-01-vm-03 5.14.0-319.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Fri May 26 17:01:24 EDT 2023
MKFS_OPTIONS  -- localhost:/export_test_s
MOUNT_OPTIONS -- -o context=system_u:object_r:root_t:s0 localhost:/export_test_s /mnt_test_s

nfs/001 5s ...  1s
Ran: nfs/001
Passed all 1 tests

[root@hp-dl385g7-01-vm-03 xfstests]# rpm -q nfs4-acl-tools
nfs4-acl-tools-0.4.2-2.el9.x86_64
[root@hp-dl385g7-01-vm-03 xfstests]#

Comment 19 Yongcheng Yang 2023-06-08 07:46:15 UTC
No new issue found in the regression tests with nfs4-acl-tools-0.4.2-2.el9: https://url.corp.redhat.com/38ca931

Comment 21 errata-xmlrpc 2023-11-07 08:55:05 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (nfs4-acl-tools bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:6657