Linux: bnxt_en: Propagate TPA buffer allocation failures in bnxt_queue_mem_alloc()
What fixes it
A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.
Description
In the Linux kernel, the following vulnerability has been resolved:
bnxt_en: Propagate TPA buffer allocation failures in bnxt_queue_mem_alloc()
bnxt_alloc_one_tpa_info_data() returns -ENOMEM as soon as one allocation fails. This leaves the remaining rxr->rx_tpa[] entries zeroed.
bnxt_queue_mem_alloc() discards that return value, so the partially initialized ring is installed by bnxt_queue_start().
Since the agg_id is picked by the hardware and bnxt_alloc_agg_idx maps it to a SW index in rxr->rx_tpa[], it is possible that an uninitialized slot can be chosen which would hand a zero DMA address to the device.
Fix this by checking the return value of bnxt_alloc_one_tpa_info_data and unwinding, freeing the ring buffers.
Text from CVE List
Affected versions 11
- Linuxaffected: 0997443906b96a051011f220a61e6dce4602ec54 before d7db2e4953e4626339fd0075564a3e447650d37bCVE List
- Linuxaffected: bd649c5cc958169b8a8a3e77ea926d92d472b02a before c8050386a2209b2a474c1eb4bd1574dc19129bfbCVE List
- Linuxaffected: bd649c5cc958169b8a8a3e77ea926d92d472b02a before 37e08dc821a57fe0592c917486b638caa888b46dCVE List
- Linuxaffected: bd649c5cc958169b8a8a3e77ea926d92d472b02a before b814dfbfeb0a68c9a52073f2caa05a2d5247a329CVE List
- Linuxaffected: 6.12.20 before 6.12.112CVE List
- Linuxaffected: 6.13CVE List
- Linuxunaffected: all versions before 6.13CVE List
- Linuxunaffected: 6.12.112 through 6.12.*CVE List
- Linuxunaffected: 6.18.53 through 6.18.*CVE List
- Linuxunaffected: 7.2.7 through 7.2.*CVE List
- Linuxunaffected: 7.3CVE List
References 4
- git.kernel.org/stable/c/d7db2e4953e4626339fd0075564a3e447650d37bReferencevia CVE List
- git.kernel.org/stable/c/c8050386a2209b2a474c1eb4bd1574dc19129bfbReferencevia CVE List
- git.kernel.org/stable/c/37e08dc821a57fe0592c917486b638caa888b46dReferencevia CVE List
- git.kernel.org/stable/c/b814dfbfeb0a68c9a52073f2caa05a2d5247a329Referencevia CVE List