CVE-2025-38186
Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
04/07/2025
Last modified:
08/07/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
bnxt_en: Fix double invocation of bnxt_ulp_stop()/bnxt_ulp_start()<br />
<br />
Before the commit under the Fixes tag below, bnxt_ulp_stop() and<br />
bnxt_ulp_start() were always invoked in pairs. After that commit,<br />
the new bnxt_ulp_restart() can be invoked after bnxt_ulp_stop()<br />
has been called. This may result in the RoCE driver&#39;s aux driver<br />
.suspend() method being invoked twice. The 2nd bnxt_re_suspend()<br />
call will crash when it dereferences a NULL pointer:<br />
<br />
(NULL ib_device): Handle device suspend call<br />
BUG: kernel NULL pointer dereference, address: 0000000000000b78<br />
PGD 0 P4D 0<br />
Oops: Oops: 0000 [#1] SMP PTI<br />
CPU: 20 UID: 0 PID: 181 Comm: kworker/u96:5 Tainted: G S 6.15.0-rc1 #4 PREEMPT(voluntary)<br />
Tainted: [S]=CPU_OUT_OF_SPEC<br />
Hardware name: Dell Inc. PowerEdge R730/072T6D, BIOS 2.4.3 01/17/2017<br />
Workqueue: bnxt_pf_wq bnxt_sp_task [bnxt_en]<br />
RIP: 0010:bnxt_re_suspend+0x45/0x1f0 [bnxt_re]<br />
Code: 8b 05 a7 3c 5b f5 48 89 44 24 18 31 c0 49 8b 5c 24 08 4d 8b 2c 24 e8 ea 06 0a f4 48 c7 c6 04 60 52 c0 48 89 df e8 1b ce f9 ff 8b 83 78 0b 00 00 48 8b 80 38 03 00 00 a8 40 0f 85 b5 00 00 00<br />
RSP: 0018:ffffa2e84084fd88 EFLAGS: 00010246<br />
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000001<br />
RDX: 0000000000000000 RSI: ffffffffb4b6b934 RDI: 00000000ffffffff<br />
RBP: ffffa1760954c9c0 R08: 0000000000000000 R09: c0000000ffffdfff<br />
R10: 0000000000000001 R11: ffffa2e84084fb50 R12: ffffa176031ef070<br />
R13: ffffa17609775000 R14: ffffa17603adc180 R15: 0000000000000000<br />
FS: 0000000000000000(0000) GS:ffffa17daa397000(0000) knlGS:0000000000000000<br />
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033<br />
CR2: 0000000000000b78 CR3: 00000004aaa30003 CR4: 00000000003706f0<br />
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000<br />
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400<br />
Call Trace:<br />
<br />
bnxt_ulp_stop+0x69/0x90 [bnxt_en]<br />
bnxt_sp_task+0x678/0x920 [bnxt_en]<br />
? __schedule+0x514/0xf50<br />
process_scheduled_works+0x9d/0x400<br />
worker_thread+0x11c/0x260<br />
? __pfx_worker_thread+0x10/0x10<br />
kthread+0xfe/0x1e0<br />
? __pfx_kthread+0x10/0x10<br />
ret_from_fork+0x2b/0x40<br />
? __pfx_kthread+0x10/0x10<br />
ret_from_fork_asm+0x1a/0x30<br />
<br />
Check the BNXT_EN_FLAG_ULP_STOPPED flag and do not proceed if the flag<br />
is already set. This will preserve the original symmetrical<br />
bnxt_ulp_stop() and bnxt_ulp_start().<br />
<br />
Also, inside bnxt_ulp_start(), clear the BNXT_EN_FLAG_ULP_STOPPED<br />
flag after taking the mutex to avoid any race condition. And for<br />
symmetry, only proceed in bnxt_ulp_start() if the<br />
BNXT_EN_FLAG_ULP_STOPPED is set.