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)
Oct 3 2024, 10:00 AM
Unknown Object (File)
Oct 3 2024, 9:40 AM
Unknown Object (File)
Oct 3 2024, 5:24 AM
Unknown Object (File)
Oct 2 2024, 9:11 PM
Unknown Object (File)
Oct 2 2024, 8:16 PM
Unknown Object (File)
Oct 2 2024, 7:03 PM
Unknown Object (File)
Oct 2 2024, 2:24 PM
Unknown Object (File)
Sep 30 2024, 7:20 PM
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