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)
Sun, Oct 19, 6:57 PM
Unknown Object (File)
Thu, Oct 16, 4:01 AM
Unknown Object (File)
Thu, Oct 16, 4:01 AM
Unknown Object (File)
Thu, Oct 16, 4:01 AM
Unknown Object (File)
Wed, Oct 15, 4:57 PM
Unknown Object (File)
Wed, Sep 24, 2:42 AM
Unknown Object (File)
Sep 20 2025, 12:40 AM
Unknown Object (File)
Sep 18 2025, 1:36 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