Bug 2363269 (CVE-2025-37787) - CVE-2025-37787 kernel: net: dsa: mv88e6xxx: avoid unregistering devlink regions which were never registered
Summary: CVE-2025-37787 kernel: net: dsa: mv88e6xxx: avoid unregistering devlink regio...
Keywords:
Status: NEW
Alias: CVE-2025-37787
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-05-01 14:01 UTC by OSIDB Bzimport
Modified: 2025-05-02 04:56 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2025-05-01 14:01:25 UTC
In the Linux kernel, the following vulnerability has been resolved:

net: dsa: mv88e6xxx: avoid unregistering devlink regions which were never registered

Russell King reports that a system with mv88e6xxx dereferences a NULL
pointer when unbinding this driver:
https://lore.kernel.org/netdev/Z_lRkMlTJ1KQ0kVX@shell.armlinux.org.uk/

The crash seems to be in devlink_region_destroy(), which is not NULL
tolerant but is given a NULL devlink global region pointer.

At least on some chips, some devlink regions are conditionally registered
since the blamed commit, see mv88e6xxx_setup_devlink_regions_global():

		if (cond && !cond(chip))
			continue;

These are MV88E6XXX_REGION_STU and MV88E6XXX_REGION_PVT. If the chip
does not have an STU or PVT, it should crash like this.

To fix the issue, avoid unregistering those regions which are NULL, i.e.
were skipped at mv88e6xxx_setup_devlink_regions_global() time.

Comment 1 Avinash Hanwate 2025-05-02 04:44:51 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025050119-CVE-2025-37787-746d@gregkh/T


Note You need to log in before you can comment on or make changes to this bug.