Page MenuHomeFreeBSD

pfctl: Fix crash on ALTQ configuration
ClosedPublic

Authored by kp on May 19 2021, 12:00 PM.

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
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; 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.