Page MenuHomeFreeBSD

imgact_elf: Ensure that the return value in parse_notes is initialized
ClosedPublic

Authored by markj on Apr 25 2021, 11:50 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 19, 1:57 PM
Unknown Object (File)
Mar 8 2024, 12:57 AM
Unknown Object (File)
Feb 5 2024, 2:06 PM
Unknown Object (File)
Dec 22 2023, 10:14 PM
Unknown Object (File)
Oct 4 2023, 9:29 PM
Unknown Object (File)
Aug 5 2023, 3:23 AM
Unknown Object (File)
Aug 5 2023, 3:23 AM
Unknown Object (File)
Aug 5 2023, 3:22 AM
Subscribers

Details

Summary

parse_notes relies on the caller-supplied callback to initialize "res".
Two callbacks are used in practice, brandnote_cb and note_fctl_cb, and
the latter fails to initialize res. Try to fix it.

Reported by: KMSAN

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

I.e. the only effect of this was that the inner loop from check_note potentially did not stopped after fctl note was handled, but continued till the end of the phdrs.

This revision is now accepted and ready to land.Apr 26 2021, 12:03 AM
In D29986#672701, @kib wrote:

I.e. the only effect of this was that the inner loop from check_note potentially did not stopped after fctl note was handled, but continued till the end of the phdrs.

I think so, yes. I will note this in the commit message.