Page MenuHomeFreeBSD

pfctl: Fix crash on ALTQ configuration
ClosedPublic

Authored by kp on May 19 2021, 12:00 PM.
Tags
None
Referenced Files
F131683312: D30346.id89468.diff
Fri, Oct 10, 7:53 AM
F131683305: D30346.id.diff
Fri, Oct 10, 7:53 AM
F131683304: D30346.id89527.diff
Fri, Oct 10, 7:53 AM
F131652724: D30346.diff
Fri, Oct 10, 1:52 AM
Unknown Object (File)
Fri, Oct 3, 2:13 AM
Unknown Object (File)
Wed, Oct 1, 4:26 AM
Unknown Object (File)
Sat, Sep 27, 2:14 AM
Unknown Object (File)
Thu, Sep 25, 2:16 PM
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.