octeontx2-pf: fix SQB pointer leak on init failure
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ caa2da34fd25a37e9fd43343b6966fb9d730a6d5 · < 5df30f05db96552903680a17f858d250dfd9e86e| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
octeontx2-pf: fix SQB pointer leak on init failure
otx2_init_hw_resources() initializes SQ aura and pool resources before several later setup steps. On failure, err_free_sq_ptrs only frees SQB pages, leaving the per-SQ sqb_ptrs arrays behind.
Use otx2_free_sq_res() for the SQ unwind path and let it free sqb_ptrs even when sq->sqe has not been allocated yet.
The bug was first flagged by an experimental analysis tool we are developing for kernel memory-management bugs while analyzing v6.13-rc1. The tool is still under development and is not yet publicly available. Manual inspection confirms that the bug is still present in v7.1.1.
An x86_64 allyesconfig build showed no new warnings. As we do not have an OcteonTX2 PF device and the corresponding AF mailbox setup to test with, no runtime testing was able to be performed.
From the CVE record · Linux
The Linux kernel’s octeontx2-pf driver can leak per-SQ sqb_ptrs arrays when hardware resource initialization fails. The input does not establish whether an attacker can trigger this failure or specify any network, authentication, or user-interaction conditions.
Engineers running Linux kernels with the octeontx2-pf driver should check their versions; the bug was flagged while analyzing v6.13-rc1 and manually confirmed in v7.1.1.