Bug 16287 - vfs_acl_xattr crashes on zero-sized flistxattr queries
Summary: vfs_acl_xattr crashes on zero-sized flistxattr queries
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: VFS Modules (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Samba release manager
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-10-21 18:14 UTC by Anoop C S
Modified: 2026-10-27 22:02 UTC (History)
1 user (show)

See Also:


Attachments
patch from master for v4-25-test (5.68 KB, patch)
2026-10-22 17:23 UTC, Anoop C S
vl: review+
Details
patch from master for v4-24-test (5.68 KB, patch)
2026-10-22 17:23 UTC, Anoop C S
vl: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anoop C S 2026-10-21 18:14:52 UTC
acl_xattr_flistxattr() dereferences a NULL buffer when handling a valid size-only request:

SMB_VFS_FLISTXATTR(fsp, NULL, 0);

If the backend returns a positive required size, the wrapper proceeds to scan listbuf and calls strlen() on NULL. No attribute names were written because the supplied buffer size was zero.
Comment 1 Samba QA Contact 2026-10-22 16:58:03 UTC
This bug was referenced in samba master:

ef92707ad7de631572d325213a03f9f6128d53a4
eb679b76beaad9e31fd1c0a07aee890f3948abe9
Comment 2 Anoop C S 2026-10-22 17:23:11 UTC
Created attachment 19304 [details]
patch from master for v4-25-test
Comment 3 Anoop C S 2026-10-22 17:23:37 UTC
Created attachment 19305 [details]
patch from master for v4-24-test
Comment 4 Samba QA Contact 2026-10-22 19:11:12 UTC
This bug was referenced in samba v4-24-test:

fbf1bf0fb4a4b16faa06895624ae96ca8c6acfd9
4227bc9f2076eac6213a48bd62007446437c0a97
Comment 5 Samba QA Contact 2026-10-23 14:39:11 UTC
This bug was referenced in samba v4-25-test:

cdff986c8ea6287d5d89b0e50f9bdb87d7205dd4
7ae230c49eded16ccfe680a7d849d30d6bb597a2
Comment 6 Samba QA Contact 2026-10-23 15:39:33 UTC
This bug was referenced in samba v4-25-stable (Release samba-4.25.1):

cdff986c8ea6287d5d89b0e50f9bdb87d7205dd4
7ae230c49eded16ccfe680a7d849d30d6bb597a2