Page MenuHomeFreeBSD

Fix bad libbxo format strings in jls
ClosedPublic

Authored by arichardson on Oct 21 2020, 11:18 AM.
Tags
None
Referenced Files
F109942251: D26885.id78537.diff
Tue, Feb 11, 12:56 PM
F109940149: D26885.id78539.diff
Tue, Feb 11, 12:45 PM
F109940057: D26885.id79171.diff
Tue, Feb 11, 12:43 PM
F109923862: D26885.diff
Tue, Feb 11, 7:11 AM
Unknown Object (File)
Sat, Feb 8, 6:51 AM
Unknown Object (File)
Sat, Feb 8, 6:37 AM
Unknown Object (File)
Tue, Jan 21, 8:19 PM
Unknown Object (File)
Sun, Jan 19, 9:31 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

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable