CVE-2022-48728

Severity CVSS v4.0:
Pending analysis
Type:
CWE-476 NULL Pointer Dereference
Publication date:
20/06/2024
Last modified:
18/09/2024

Description

In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> IB/hfi1: Fix AIP early init panic<br /> <br /> An early failure in hfi1_ipoib_setup_rn() can lead to the following panic:<br /> <br /> BUG: unable to handle kernel NULL pointer dereference at 00000000000001b0<br /> PGD 0 P4D 0<br /> Oops: 0002 [#1] SMP NOPTI<br /> Workqueue: events work_for_cpu_fn<br /> RIP: 0010:try_to_grab_pending+0x2b/0x140<br /> Code: 1f 44 00 00 41 55 41 54 55 48 89 d5 53 48 89 fb 9c 58 0f 1f 44 00 00 48 89 c2 fa 66 0f 1f 44 00 00 48 89 55 00 40 84 f6 75 77 48 0f ba 2b 00 72 09 31 c0 5b 5d 41 5c 41 5d c3 48 89 df e8 6c<br /> RSP: 0018:ffffb6b3cf7cfa48 EFLAGS: 00010046<br /> RAX: 0000000000000246 RBX: 00000000000001b0 RCX: 0000000000000000<br /> RDX: 0000000000000246 RSI: 0000000000000000 RDI: 00000000000001b0<br /> RBP: ffffb6b3cf7cfa70 R08: 0000000000000f09 R09: 0000000000000001<br /> R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000<br /> R13: ffffb6b3cf7cfa90 R14: ffffffff9b2fbfc0 R15: ffff8a4fdf244690<br /> FS: 0000000000000000(0000) GS:ffff8a527f400000(0000) knlGS:0000000000000000<br /> CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033<br /> CR2: 00000000000001b0 CR3: 00000017e2410003 CR4: 00000000007706f0<br /> DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000<br /> DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400<br /> PKRU: 55555554<br /> Call Trace:<br /> __cancel_work_timer+0x42/0x190<br /> ? dev_printk_emit+0x4e/0x70<br /> iowait_cancel_work+0x15/0x30 [hfi1]<br /> hfi1_ipoib_txreq_deinit+0x5a/0x220 [hfi1]<br /> ? dev_err+0x6c/0x90<br /> hfi1_ipoib_netdev_dtor+0x15/0x30 [hfi1]<br /> hfi1_ipoib_setup_rn+0x10e/0x150 [hfi1]<br /> rdma_init_netdev+0x5a/0x80 [ib_core]<br /> ? hfi1_ipoib_free_rdma_netdev+0x20/0x20 [hfi1]<br /> ipoib_intf_init+0x6c/0x350 [ib_ipoib]<br /> ipoib_intf_alloc+0x5c/0xc0 [ib_ipoib]<br /> ipoib_add_one+0xbe/0x300 [ib_ipoib]<br /> add_client_context+0x12c/0x1a0 [ib_core]<br /> enable_device_and_get+0xdc/0x1d0 [ib_core]<br /> ib_register_device+0x572/0x6b0 [ib_core]<br /> rvt_register_device+0x11b/0x220 [rdmavt]<br /> hfi1_register_ib_device+0x6b4/0x770 [hfi1]<br /> do_init_one.isra.20+0x3e3/0x680 [hfi1]<br /> local_pci_probe+0x41/0x90<br /> work_for_cpu_fn+0x16/0x20<br /> process_one_work+0x1a7/0x360<br /> ? create_worker+0x1a0/0x1a0<br /> worker_thread+0x1cf/0x390<br /> ? create_worker+0x1a0/0x1a0<br /> kthread+0x116/0x130<br /> ? kthread_flush_work_fn+0x10/0x10<br /> ret_from_fork+0x1f/0x40<br /> <br /> The panic happens in hfi1_ipoib_txreq_deinit() because there is a NULL<br /> deref when hfi1_ipoib_netdev_dtor() is called in this error case.<br /> <br /> hfi1_ipoib_txreq_init() and hfi1_ipoib_rxq_init() are self unwinding so<br /> fix by adjusting the error paths accordingly.<br /> <br /> Other changes:<br /> - hfi1_ipoib_free_rdma_netdev() is deleted including the free_netdev()<br /> since the netdev core code deletes calls free_netdev()<br /> - The switch to the accelerated entrances is moved to the success path.

Vulnerable products and versions

CPE From Up to
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.8 (including) 5.10.99 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.11 (including) 5.15.22 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.16 (including) 5.16.8 (excluding)
cpe:2.3:o:linux:linux_kernel:5.17:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:5.17:rc2:*:*:*:*:*:*