Page MenuHomeFreeBSD

[UPSTREAM] Fix bad libbxo format strings in jls
AbandonedPublic

Authored by arichardson on Oct 21 2020, 11:22 AM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 20 2023, 7:46 AM
Unknown Object (File)
Sep 30 2023, 7:08 PM
Unknown Object (File)
Sep 21 2023, 10:12 PM
Subscribers
None

Details

Reviewers
None
Summary

The existing format string for the empty case was trying to read varargs
values that weren't passed to xo_emit. This appears to work on x86 (since
the next argument is probably a pointer an empty string), but for CHERI
we can bound variadic arguments and detect a read past the end.

While touching these lines also use the libxo a modifier to avoid having to
construct the libxo format string using asprintf.

Found by: CHERI

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 34294
Build 31431: arc lint + arc unit