BSDSec

deadsimple BSD Security Advisories and Announcements

FreeBSD Errata Notice FreeBSD-EN-25:17.bnxt

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

=============================================================================
FreeBSD-EN-25:17.bnxt                                           Errata Notice
                                                          The FreeBSD Project

Topic:          bnxt(4) fails to set media type in some cases

Category:       core
Module:         bnxt
Announced:      2025-09-16
Affects:        FreeBSD 14.3
Corrected:      2025-06-22 07:18:55 UTC (stable/14, 14.3-STABLE)
                2025-09-16 16:31:08 UTC (releng/14.3, 14.3-RELEASE-p3)

For general information regarding FreeBSD Errata Notices and Security
Advisories, including descriptions of the fields above, security
branches, and the following sections, please visit
<URL:https://security.FreeBSD.org/>.

I.   Background

The bnxt(4) driver provides support for Broadcom NetXtreme-C/NetXtreme-E Family
of Ethernet controllers.  A key function of the driver is to report the various
supported physical media types and operational modes (e.g., 1000base-T,
40GBASE-AOC, full-duplex, autoselect) to the operating system's ifmedia
interface.  This allows network administrators to view and configure the
interface link settings.

II.  Problem Description

A logic error was introduced into the bnxt(4) driver which prevented the proper
population of the supported media list for several physical connection types.
Inside the function responsible for building this list, a switch statement
incorrectly used return statements instead of break statements.  This caused
the function to exit prematurely after identifying certain media types,
including common BASE-T (copper), 40G Active Optical Cable (AOC), and 1G-CX
connections, before the corresponding speed and duplex options could be
registered with the network subsystem.

III. Impact

For network controllers using the affected media types, the driver fails to
advertise any supported link modes.  An administrator running ifconfig(8) on
the interface would see incorrect media (unknown).  Because of this, the
network interface may be unable to establish a link, as the operating system
cannot properly configure it or initiate auto-negotiation.  The network port
will be unusable.

IV.  Workaround

No workaround is available.  Only systems that uses bnxt(4) device with the
affected media types are affected.

V.   Solution

Upgrade your system to a supported FreeBSD stable or release / security
branch (releng) dated after the correction date.

Perform one of the following:

1) To update your system via a binary patch:

Systems running a RELEASE version of FreeBSD on the amd64 or arm64 platforms,
or the i386 platform on FreeBSD 13, can be updated via the freebsd-update(8)
utility:

# freebsd-update fetch
# freebsd-update install
# shutdown -r now

2) To update your system via a source code patch:

The following patches have been verified to apply to the applicable
FreeBSD release branches.

a) Download the relevant patch from the location below, and verify the
detached PGP signature using your PGP utility.

# fetch https://security.FreeBSD.org/patches/EN-25:17/bnxt.patch
# fetch https://security.FreeBSD.org/patches/EN-25:17/bnxt.patch.asc
# gpg --verify bnxt.patch.asc

b) Apply the patch.  Execute the following commands as root:

# cd /usr/src
# patch < /path/to/patch

c) Recompile your kernel as described in
<URL:https://www.FreeBSD.org/handbook/kernelconfig.html> and reboot the
system.

VI.  Correction details

This issue is corrected as of the corresponding Git commit hash in the
following stable and release branches:

Branch/path                             Hash                     Revision
- -------------------------------------------------------------------------
stable/14/                              33f65f12eba1    stable/14-n271757
releng/14.3/                            c07b1838f9c9  releng/14.3-n271442
- -------------------------------------------------------------------------

Run the following command to see which files were modified by a
particular commit:

# git show --stat <commit hash>

Or visit the following URL, replacing NNNNNN with the hash:

<URL:https://cgit.freebsd.org/src/commit/?id3f65f12eba1>

To determine the commit count in a working tree (for comparison against
nNNNNNN in the table above), run:

# git rev-list --count --first-parent HEAD

VII. References

<URL:https://bugs.freebsd.org/bugzilla/show_bug.cgi?id(7395>

The latest revision of this advisory is available at
<URL:https://security.FreeBSD.org/advisories/FreeBSD-EN-25:17.bnxt.asc>
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEthUnfoEIffdcgYM7bljekB8AGu8FAmjJlBUACgkQbljekB8A
Gu//GBAAu3k3rFlqFKbSgq38xldf8fFngj/IuLa4BjB2lcTa7Rpy+6vxlFxXyqVk
9VVXf+tkXNhQ5ngY52SqMDdlG0OQdr+rwPcB8bI2nw+1DW1FRMVvBN7PlJrGgs2N
OtE6I4Wy+IK7vyzEgs8P3Kq3U7oXQVz/jJ3n1DmmjxlKfNqlo3eOGDlNZgTdFF2h
NbZUW4CGZTQxV4Ihq7Zg99bJw38o6WkOjkBkd7/djQfLm9aufVoWPN7SDaVnDun0
vtWTTXrxsmPfVZB0sxdhYLjKPX+4GdVype0k3A26K50dTNVh5GAhWzH1LqFS6BR4
DveE4/02bjaTAqK1XW+08JoGqibzmOTt8mUOlKL1aomACgmFc2Lzj33Qd6z1JdJB
6XYTcAoi2Kz94VHBMYjgWOBjiw66YryEyNpHJkFCfWnA3jgZB9TKZn2FZPxGBbvM
6an5ZcjaKHv1X+en2Fh8Ri1Hq4CKN/SmI/Sp0B28hXv8MQCNOnTqxqgdKgg2xQnD
0BasLt7y8y4rAHed+znWW1gRHWLP9q4FLqdvargtdMO81N2n/fm8jKe+SD2YNfTQ
Nvs29hRzs/thxI1gJMhDmmHkprGOyy6fzdZLtUjqhPh2l/YvHq32i/iNKpVfCy5v
hHpd38wxOpTs5nk4qbVZlS2DgRuTSO/VU0IMphaIwBhwHkZaoWY=jvzm
-----END PGP SIGNATURE-----