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)
Thu, May 21, 9:58 AM
Unknown Object (File)
Sun, May 10, 2:29 PM
Unknown Object (File)
Sun, May 10, 2:20 PM
Unknown Object (File)
Sun, May 10, 12:08 AM
Unknown Object (File)
Sun, May 10, 12:04 AM
Unknown Object (File)
Apr 21 2026, 9:08 PM
Unknown Object (File)
Apr 20 2026, 5:12 PM
Unknown Object (File)
Apr 20 2026, 5:08 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 Not Applicable
Unit
Tests Not Applicable

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