Bug 1227779 (CVE-2024-40919)

Summary: VUL-0: CVE-2024-40919: kernel: bnxt_en: adjust logging of firmware messages in case of released token in __hwrm_send()
Product: [Novell Products] SUSE Security Incidents Reporter: SMASH SMASH <smash_bz>
Component: IncidentsAssignee: Security Team bot <security-team>
Status: NEW --- QA Contact: Security Team bot <security-team>
Severity: Normal    
Priority: P3 - Medium CC: camila.matos, mhocko, miroslav.franc
Version: unspecified   
Target Milestone: ---   
Hardware: Other   
OS: Other   
URL: https://smash.suse.de/issue/413846/
Whiteboard: CVSSv3.1:SUSE:CVE-2024-40919:5.5:(AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H)
Found By: Security Response Team Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description SMASH SMASH 2024-07-15 11:09:27 UTC
In the Linux kernel, the following vulnerability has been resolved:

bnxt_en: Adjust logging of firmware messages in case of released token in __hwrm_send()

In case of token is released due to token->state == BNXT_HWRM_DEFERRED,
released token (set to NULL) is used in log messages. This issue is
expected to be prevented by HWRM_ERR_CODE_PF_UNAVAILABLE error code. But
this error code is returned by recent firmware. So some firmware may not
return it. This may lead to NULL pointer dereference.
Adjust this issue by adding token pointer check.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

References:
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2024-40919
https://www.cve.org/CVERecord?id=CVE-2024-40919
https://git.kernel.org/stable/c/8b65eaeae88d4e9f999e806e196dd887b90bfed9
https://git.kernel.org/stable/c/a9b9741854a9fe9df948af49ca5514e0ed0429df
https://git.kernel.org/stable/c/ca6660c956242623b4cfe9be2a1abc67907c44bf
https://git.kernel.org/stable/c/cde177fa235cd36f981012504a6376315bac03c9
https://git.kernel.org/pub/scm/linux/security/vulns.git/plain/cve/published/2024/CVE-2024-40919.mbox