CVE-2022-48884: net/mlx5: Fix command stats access after free
In the Linux kernel, the following vulnerability has been resolved:
net/mlx5: Fix command stats access after free
Command may fail while driver is reloading and can't accept FW commands till command interface is reinitialized. Such command failure is being logged to command stats. This results in NULL pointer access as command stats structure is being freed and reallocated during mlx5 devlink reload (see kernel log below).
Fix it by making command stats statically allocated on driver probe.
Kernel log: [ 2394.808802] BUG: unable to handle kernel paging request at 000000000002a9c0 [ 2394.810610] PGD 0 P4D 0 [ 2394.811811] Oops: 0002 [#1] SMP NOPTI ... [ 2394.815482] RIP: 0010:nativequeuedspinlockslowpath+0x183/0x1d0 ... [ 2394.829505] Call Trace: [ 2394.830667] rawspinlockirq+0x23/0x26 [ 2394.831858] cmdstatuserr+0x55/0x110 [mlx5core] [ 2394.833020] mlx5accessreg+0xe7/0x150 [mlx5core] [ 2394.834175] mlx5queryportptys+0x78/0xa0 [mlx5core] [ 2394.835337] mlx5eethtoolgetlinkksettings+0x74/0x590 [mlx5core] [ 2394.836454] ? kmemcachealloctrace+0x140/0x1c0 [ 2394.837562] rhcallgetlinkksettings+0x33/0x100 [ 2394.838663] ? rtnlunlock+0x25/0x50 [ 2394.839755] ethtoolgetlinkksettings+0x72/0x150 [ 2394.840862] duplexshow+0x6e/0xc0 [ 2394.841963] devattrshow+0x1c/0x40 [ 2394.843048] sysfskfseqshow+0x9b/0x100 [ 2394.844123] seqread+0x153/0x410 [ 2394.845187] vfsread+0x91/0x140 [ 2394.846226] ksysread+0x4f/0xb0 [ 2394.847234] dosyscall64+0x5b/0x1a0 [ 2394.848228] entrySYSCALL64afterhwframe+0x65/0xca
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2022-48884?
The severity of CVE-2022-48884 is classified as medium.
How do I fix CVE-2022-48884?
To fix CVE-2022-48884, update the Linux kernel to a patched version that addresses this vulnerability.
What are the affected versions for CVE-2022-48884?
CVE-2022-48884 affects Linux kernel versions from 5.18 to 6.1.7 and includes 6.2 release candidates.
What is the impact of CVE-2022-48884?
The impact of CVE-2022-48884 could lead to command failures while the driver is reloading, affecting system stability.
Is CVE-2022-48884 exploitable remotely?
CVE-2022-48884 is generally considered not to be remotely exploitable, as it relates to driver operation on the system.