Bug 2265791 (CVE-2023-52454) - CVE-2023-52454 kernel: nvmet-tcp: Fix a kernel panic when host sends an invalid H2C PDU length
Summary: CVE-2023-52454 kernel: nvmet-tcp: Fix a kernel panic when host sends an inval...
Keywords:
Status: NEW
Alias: CVE-2023-52454
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 2265803
Blocks: 2265790
TreeView+ depends on / blocked
 
Reported: 2024-02-24 11:19 UTC by Patrick Del Bello
Modified: 2024-07-01 19:51 UTC (History)
50 users (show)

Fixed In Version: kernel 6.8-rc1
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description Patrick Del Bello 2024-02-24 11:19:54 UTC
nvmet-tcp: Fix a kernel panic when host sends an invalid H2C PDU length

If the host sends an H2CData command with an invalid DATAL,
the kernel may crash in nvmet_tcp_build_pdu_iovec().

Unable to handle kernel NULL pointer dereference at
virtual address 0000000000000000
lr : nvmet_tcp_io_work+0x6ac/0x718 [nvmet_tcp]
Call trace:
  process_one_work+0x174/0x3c8
  worker_thread+0x2d0/0x3e8
  kthread+0x104/0x110

Fix the bug by raising a fatal error if DATAL isn't coherent
with the packet size.
Also, the PDU length should never exceed the MAXH2CDATA parameter which
has been communicated to the host in nvmet_tcp_handle_icreq().

Comment 1 Patrick Del Bello 2024-02-24 11:23:18 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 2265803]

Comment 3 Justin M. Forbes 2024-02-27 00:23:01 UTC
	Issue introduced in 5.0 with commit 872d26a391da and fixed in 5.4.268 with commit ee5e7632e981
	Issue introduced in 5.0 with commit 872d26a391da and fixed in 5.10.209 with commit f775f2621c2a
	Issue introduced in 5.0 with commit 872d26a391da and fixed in 5.15.148 with commit 4cb3cf7177ae
	Issue introduced in 5.0 with commit 872d26a391da and fixed in 6.1.75 with commit 2871aa407007
	Issue introduced in 5.0 with commit 872d26a391da and fixed in 6.6.14 with commit 24e05760186d
	Issue introduced in 5.0 with commit 872d26a391da and fixed in 6.7.2 with commit 70154e8d015c
	Issue introduced in 5.0 with commit 872d26a391da and fixed in 6.8-rc1 with commit efa56305908b

Comment 4 Justin M. Forbes 2024-02-27 00:23:24 UTC
This was fixed for Fedora with the 6.6.14 stable kernel updates.

Comment 8 Alex 2024-06-09 15:06:20 UTC
The result of automatic check (that is developed by Alexander Larkin) for this CVE-2023-52454 is: CHECK	Maybe valid. Check manually. with impact MODERATE (that is approximation based on flags REMOTE DANGER NULLPTR NVME NETWORK  ; these flags parsed automatically based on patche data). Such automatic check happens only for Low/Moderates (and only when not from reporter, but parsing already existing CVE). Highs always checked manually (I check it myself and then we check it again in Remediation team). In rare cases some of the Moderates could be increased to High later.


Note You need to log in before you can comment on or make changes to this bug.