octeontx2-pf: fix NULL deref of af_xdp_zc_qidx on rep setup
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
6.15
|
In the Linux kernel, the following vulnerability has been resolved:
octeontx2-pf: fix NULL deref of af_xdp_zc_qidx on rep setup
af_xdp_zc_qidx tracks receive queues using AF_XDP zero-copy and is allocated during PF/VF probe. Representors and other non-AF_XDP paths leave the pointer NULL, but several call sites used test_bit() on it unconditionally.
Switching to devlink eswitch mode creates representors and runs otx2_init_hw_resources(), which reaches otx2_pool_aq_init() and oopses when dereferencing the NULL bitmap. Add NULL checks before every af_xdp_zc_qidx test_bit() use in the RSS, ethtool, XSK, and pool init paths.
From the CVE record · Linux
The Linux kernel's octeontx2-pf driver can dereference a NULL AF_XDP zero-copy queue bitmap when devlink eswitch mode is switched and representors are created. This can crash the kernel; the input does not specify whether an attacker can trigger it or what access would be required.
Engineers running Linux kernels with the octeontx2-pf driver should check their kernel versions for the fix; affected versions are not specified.