Page MenuHomeFreeBSD

Fix bad libbxo format strings in jls
ClosedPublic

Authored by arichardson on Oct 21 2020, 11:18 AM.
Tags
None
Referenced Files
F159688542: D26885.id78539.diff
Wed, Jun 17, 2:38 AM
F159672885: D26885.id78537.diff
Tue, Jun 16, 10:27 PM
Unknown Object (File)
Tue, Jun 16, 1:14 PM
Unknown Object (File)
Thu, Jun 4, 4:10 PM
Unknown Object (File)
May 17 2026, 3:02 PM
Unknown Object (File)
May 17 2026, 3:02 PM
Unknown Object (File)
May 17 2026, 11:18 AM
Unknown Object (File)
May 17 2026, 11:18 AM
Subscribers

Details

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

Test Plan

crashes on CHERI-MIPS before, now prints the expected values (XML and Text)

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 34295
Build 31432: arc lint + arc unit