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)
Sat, Jun 22, 9:16 AM
Unknown Object (File)
Apr 30 2024, 8:50 PM
Unknown Object (File)
Apr 30 2024, 8:50 PM
Unknown Object (File)
Apr 30 2024, 8:50 PM
Unknown Object (File)
Apr 28 2024, 7:42 AM
Unknown Object (File)
Apr 24 2024, 7:54 PM
Unknown Object (File)
Mar 18 2024, 4:50 PM
Unknown Object (File)
Feb 9 2024, 7:06 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