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)
Sep 27 2024, 3:52 AM
Unknown Object (File)
Sep 27 2024, 3:51 AM
Unknown Object (File)
Sep 27 2024, 3:45 AM
Unknown Object (File)
Sep 26 2024, 2:04 AM
Unknown Object (File)
Sep 20 2024, 3:11 AM
Unknown Object (File)
Aug 19 2024, 12:04 PM
Unknown Object (File)
Aug 17 2024, 7:26 AM
Unknown Object (File)
Aug 15 2024, 8:51 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.