Page MenuHomeFreeBSD

stable/12: iflib: fix potential NULL dereference
ClosedPublic

Authored by kp on Aug 31 2021, 6:31 PM.
Tags
None
Referenced Files
F161406661: D31758.id94447.diff
Fri, Jul 3, 12:09 PM
Unknown Object (File)
Fri, Jul 3, 2:14 AM
Unknown Object (File)
Thu, Jul 2, 7:05 AM
Unknown Object (File)
Tue, Jun 23, 5:37 PM
Unknown Object (File)
Tue, Jun 23, 3:48 AM
Unknown Object (File)
Sun, Jun 14, 10:28 PM
Unknown Object (File)
Mon, Jun 8, 4:31 PM
Unknown Object (File)
Mon, Jun 8, 12:13 PM
Subscribers

Details

Summary

iflib_softirq_alloc_generic() can be called with a NULL irq parameter
(as done by for example the bnxt and ixl drivers). If
iflib_irq_set_affinity() then returns an error we'd try to dereference
the NULL irq pointer.

Check irq, and pass '-1' (which taskqgroup_attach() expects) if we don't
have an irq.

Direct commit to stable/12, because this issue does not exist on main
and stable/13.

Sponsored by: Rubicon Communications, LLC ("Netgate")

Diff Detail

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

Event Timeline

kp requested review of this revision.Aug 31 2021, 6:31 PM
This revision is now accepted and ready to land.Aug 31 2021, 6:47 PM
This revision was automatically updated to reflect the committed changes.