Page MenuHomeFreeBSD

scmi: Avoid a use-after-free
ClosedPublic

Authored by andrew on Mon, Jun 9, 3:47 PM.
Tags
None
Referenced Files
F122592209: D50753.id.diff
Sun, Jul 6, 12:47 PM
Unknown Object (File)
Fri, Jul 4, 5:38 PM
Unknown Object (File)
Wed, Jul 2, 2:41 PM
Unknown Object (File)
Tue, Jul 1, 2:21 AM
Unknown Object (File)
Mon, Jun 30, 1:15 PM
Unknown Object (File)
Tue, Jun 24, 7:49 PM
Unknown Object (File)
Mon, Jun 23, 9:00 AM
Unknown Object (File)
Sat, Jun 21, 11:48 PM
Subscribers

Details

Summary

Use LIST_FOREACH_SAFE to avoid a use-after-free in scmi_reqs_pool_free.
The next pointer will be invalid after the call to free meaning
LIST_FOREACH will dereference a freed struct to move to the next item.

Sponsored by: Arm Ltd

Diff Detail

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

Event Timeline

andrew requested review of this revision.Mon, Jun 9, 3:47 PM

LGTM with two little notes:

Commit message cut off

The next pointer will be invalid when

Also it seems we generally have unique names for the field and tvar (I spotted one existing duplicate case, in uath_txfrag_setup)

This revision is now accepted and ready to land.Tue, Jun 10, 4:48 PM
This revision was automatically updated to reflect the committed changes.