Page MenuHomeFreeBSD

bnxt_en: Retrieve maximum of 128 APP TLVs
ClosedPublic

Authored by zlei on Jan 22 2025, 12:09 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Mar 18, 10:28 PM
Unknown Object (File)
Fri, Feb 28, 8:30 AM
Unknown Object (File)
Tue, Feb 25, 1:05 PM
Unknown Object (File)
Mon, Feb 24, 9:41 AM
Unknown Object (File)
Sun, Feb 23, 2:44 AM
Unknown Object (File)
Sun, Feb 23, 2:41 AM
Unknown Object (File)
Sat, Feb 22, 4:14 AM
Unknown Object (File)
Feb 19 2025, 3:39 PM
Subscribers
None

Details

Summary

It appears the maximum number of APP TLVs supported by the hardware is 128 according to D45005. Well user reports that the number may exceed the limit, causing out of bound write to on-stack allocated variable app[128] and the kernel panics.

Limit to 128 while retrieving APP TLVs.

PR: 284073
Fixes: 35b53f8c989f bnxt_en: Add PFC, ETS & App TLVs protocols support
MFC after: 1 week

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

zlei requested review of this revision.Jan 22 2025, 12:09 PM
zlei created this revision.

It would really be better to pass the maximum number of entries as a parameter, instead of hard-coding 128 in several places.

This revision is now accepted and ready to land.Jan 23 2025, 2:20 PM

It would really be better to pass the maximum number of entries as a parameter, instead of hard-coding 128 in several places.

Good point.

Passed in the limit via parameter nitems .

This revision now requires review to proceed.Feb 13 2025, 4:14 PM
This revision is now accepted and ready to land.Feb 13 2025, 4:52 PM
This revision was automatically updated to reflect the committed changes.