Bug 14648 - Missing TALLOC_FREE in source3/modules/nfs4_acls.c
Summary: Missing TALLOC_FREE in source3/modules/nfs4_acls.c
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: VFS Modules (show other bugs)
Version: 4.14.0rc3
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-23 14:36 UTC by Peter Eriksson
Modified: 2021-04-12 12:38 UTC (History)
2 users (show)

See Also:


Attachments
Silly patch to fix the missing TALLOC_FREE() (294 bytes, patch)
2021-02-23 14:51 UTC, Peter Eriksson
no flags Details
git-am fix for 4.14.next, 4.13.next, 4.12.next. (1.06 KB, patch)
2021-02-25 21:18 UTC, Jeremy Allison
dmulder: review+
npower: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Eriksson 2021-02-23 14:36:35 UTC
Feb 23 13:11:57 filur06 smbd_audit[83759]:   Freed frame ../../source3/smbd/process.c:3708, expected ../../source3/modules/nfs4_acls.c:996.
Feb 23 13:11:57 filur06 smbd_audit[83759]: [2021/02/23 13:11:57.745342,  0] ../../lib/util/talloc_stack.c:102(talloc_pop)
Feb 23 13:11:57 filur06 smbd_audit[83759]:   Freed frame ../../source3/smbd/process.c:3708, expected ../../source3/modules/nfs4_acls.c:996.
Feb 23 13:11:58 filur06 smbd_audit[83759]: [2021/02/23 13:11:58.383847,  0] ../../lib/util/talloc_stack.c:102(talloc_pop)
Feb 23 13:11:58 filur06 smbd_audit[83759]:   Freed frame ../../source3/smbd/process.c:3708, expected ../../source3/modules/nfs4_acls.c:996.
Feb 23 13:11:58 filur06 smbd_audit[83759]: [2021/02/23 13:11:58.409805,  0] ../../lib/util/talloc_stack.c:102(talloc_pop)
Feb 23 13:11:58 filur06 smbd_audit[83759]:   Freed frame ../../source3/smbd/process.c:3708, expected ../../source3/modules/nfs4_acls.c:996.
Feb 23 14:21:35 filur06 smbd_audit[6170]: [2021/02/23 14:21:35.404096,  0] ../../source3/modules/vfs_full_audit.c:576(init_bitmap)

Looking at the code in source3/modules/nfs4_acls.c then there seems to be a 
missing TALLOC_FREE(frame) just before return NT_STATUS_OK at line 1011:

       if (security_descriptor_with_ms_nfs(psd)) {
                return NT_STATUS_OK;
        }

(unless there's some magic I'm not seeing)
Comment 1 Peter Eriksson 2021-02-23 14:51:58 UTC
Created attachment 16468 [details]
Silly patch to fix the missing TALLOC_FREE()
Comment 2 Peter Eriksson 2021-02-23 14:56:16 UTC
Same in 4.14rc3 (around line 1000) btw.
Comment 3 Jeremy Allison 2021-02-23 22:48:29 UTC
MR:

https://gitlab.com/samba-team/samba/-/merge_requests/1809
Comment 4 Samba QA Contact 2021-02-25 20:47:03 UTC
This bug was referenced in samba master:

3d91fe071a29e2e0c54a10ba081a46cb5c324585
Comment 5 Jeremy Allison 2021-02-25 21:18:11 UTC
Created attachment 16473 [details]
git-am fix for 4.14.next, 4.13.next, 4.12.next.

Cherry-picked from master.
Comment 6 Jeremy Allison 2021-03-01 22:14:52 UTC
Re-assigning to Karolin for inclusion in 4.14.next, 4.13.next, 4.12.next.
Comment 7 Karolin Seeger 2021-03-03 08:12:09 UTC
(In reply to Jeremy Allison from comment #6)
Pushed to autobuild-v4-{14,13,12}-test.
Comment 8 Samba QA Contact 2021-03-03 09:09:13 UTC
This bug was referenced in samba v4-13-test:

0eb58c2d68b68e63a603bb4a3fdced5c3cae4a68
Comment 9 Samba QA Contact 2021-03-03 10:13:04 UTC
This bug was referenced in samba v4-14-test:

1fb83efd7d580de547da774fa5edb6eb72622d54
Comment 10 Samba QA Contact 2021-03-03 11:12:11 UTC
This bug was referenced in samba v4-12-test:

1c37606163ee964584e946e36a1d1c8efb1606e3
Comment 11 Samba QA Contact 2021-03-09 11:01:17 UTC
This bug was referenced in samba v4-13-stable (Release samba-4.13.5):

0eb58c2d68b68e63a603bb4a3fdced5c3cae4a68
Comment 12 Samba QA Contact 2021-03-09 12:39:07 UTC
This bug was referenced in samba v4-14-stable (Release samba-4.14.0):

1fb83efd7d580de547da774fa5edb6eb72622d54
Comment 13 Samba QA Contact 2021-03-11 11:48:37 UTC
This bug was referenced in samba v4-12-stable (Release samba-4.12.12):

1c37606163ee964584e946e36a1d1c8efb1606e3