Page MenuHomeFreeBSD

acl_equiv_mode_np: zero mode on just inited ACL
ClosedPublic

Authored by brooks on Jan 2 2024, 10:04 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Mar 20, 8:00 AM
Unknown Object (File)
Tue, Mar 17, 4:48 AM
Unknown Object (File)
Sun, Mar 8, 6:59 PM
Unknown Object (File)
Sat, Mar 7, 9:38 PM
Unknown Object (File)
Feb 3 2026, 8:44 PM
Unknown Object (File)
Jan 27 2026, 10:32 AM
Unknown Object (File)
Jan 27 2026, 5:30 AM
Unknown Object (File)
Jan 25 2026, 5:52 AM
Subscribers

Details

Summary

You can't return 0 and not write the mode if mode_p is non-NULL. That
violates the API contract and in common usage leaves stack trash in
*mode_p.

The acl_equiv_mode_test test passed by accident.

Sponsored by: DARPA

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 55202
Build 52091: arc lint + arc unit

Event Timeline

I bumped into this on CheriBSD were different stack layout made mode non-zero in the caller.

This revision is now accepted and ready to land.Jan 3 2024, 12:21 AM