Page MenuHomeFreeBSD

pfctl: Fix crash on ALTQ configuration
ClosedPublic

Authored by kp on May 19 2021, 12:00 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 15, 11:33 PM
Unknown Object (File)
Mon, Apr 15, 11:33 PM
Unknown Object (File)
Mon, Apr 15, 11:32 PM
Unknown Object (File)
Fri, Mar 29, 5:06 AM
Unknown Object (File)
Jan 13 2024, 1:33 AM
Unknown Object (File)
Dec 23 2023, 6:59 PM
Unknown Object (File)
Dec 20 2023, 5:10 PM
Unknown Object (File)
Dec 20 2023, 5:42 AM
Subscribers

Details

Summary

The following config could crash pfctl:
altq on igb0 fairq bandwidth 1Gb queue { qLink }
queue qLink fairq(default)

That happens because when we're parsing the parent queue (on igb0) it
doesn't have a parent, and the check in eval_pfqueue_fairq() checks
pa->parent rather than parent.

This was changed in eval_pfqueue_hfsc() in
1d34c9dac8624c5c315ae39ad3ae8e5879b23256, but not for fairq.

MFC after: 1 week
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.May 19 2021, 12:00 PM
pkelsey added a reviewer: pkelsey.

This is the right fix for what is a mistaken partial edit that occurred when parent determination was pulled up into eval_pfqueue() during 1d34c9dac8624c5c315ae39ad3ae8e5879b23256.

This revision is now accepted and ready to land.May 19 2021, 8:20 PM

This is the right fix for what is a mistaken partial edit that occurred when parent determination was pulled up into eval_pfqueue() during 1d34c9dac8624c5c315ae39ad3ae8e5879b23256.

Thanks! That's what it looked like while I was debugging this, but it's great to have confirmation. I think you understand this part of the code better than I do.

This revision was automatically updated to reflect the committed changes.