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)
Wed, Sep 24, 2:42 AM
Unknown Object (File)
Sat, Sep 20, 12:40 AM
Unknown Object (File)
Thu, Sep 18, 1:36 AM
Unknown Object (File)
Sep 9 2025, 7:26 PM
Unknown Object (File)
Aug 14 2025, 10:37 AM
Unknown Object (File)
Aug 13 2025, 6:39 PM
Unknown Object (File)
Jun 26 2025, 5:42 AM
Unknown Object (File)
Jun 26 2025, 1:35 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 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