Page MenuHomeFreeBSD

pfctl: Fix crash on ALTQ configuration
ClosedPublic

Authored by kp on May 19 2021, 12:00 PM.
Tags
None
Referenced Files
F86061261: D30346.diff
Fri, Jun 14, 7:53 PM
Unknown Object (File)
Mon, May 20, 7:32 PM
Unknown Object (File)
Sun, May 19, 1:55 PM
Unknown Object (File)
May 14 2024, 8:35 PM
Unknown Object (File)
Apr 15 2024, 11:33 PM
Unknown Object (File)
Apr 15 2024, 11:33 PM
Unknown Object (File)
Apr 15 2024, 11:32 PM
Unknown Object (File)
Mar 29 2024, 5:06 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.