Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2023-54295— mtd: spi-nor: Fix shift-out-of-bounds in spi_nor_set_erase_type

Quick assessment

Affected
Linux Linux
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于屏蔽擦除类型时设置size_shift为-1,可能导致越界移位。

AI Predicted 5.0 Difficulty: Moderate EPSS 0.20% · P9

Possible ATT&CK Techniques 1 AI

T1068 · Exploitation for Privilege Escalation

Affected Version Matrix 12

VendorProduct Version RangeStatus
Linux Linux 5390a8df769ec9ba9c995191bb0867430f602ebb< e6409208c13f7c56adc12dd795abf4141e3d5e64 affected
5390a8df769ec9ba9c995191bb0867430f602ebb< 61d44a4db2f54dbac7d22c2541574ea5755e0468 affected
5390a8df769ec9ba9c995191bb0867430f602ebb< 53b2916ebde741c657a857fa1936c0d9fcb59170 affected
5390a8df769ec9ba9c995191bb0867430f602ebb< 99341b8aee7b5b4255b339345bbcaa35867dfd0c affected
5390a8df769ec9ba9c995191bb0867430f602ebb< f0f0cfdc3a024e21161714f2e05f0df3b84d42ad affected
4.20 affected
< 4.20 unaffected
5.10.173≤ 5.10.* unaffected
… +4 more rows
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2023-54295

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
mtd: spi-nor: Fix shift-out-of-bounds in spi_nor_set_erase_type
Source: CVE Program / CVE List V5
Vulnerability Description
In the Linux kernel, the following vulnerability has been resolved: mtd: spi-nor: Fix shift-out-of-bounds in spi_nor_set_erase_type spi_nor_set_erase_type() was used either to set or to mask out an erase type. When we used it to mask out an erase type a shift-out-of-bounds was hit: UBSAN: shift-out-of-bounds in drivers/mtd/spi-nor/core.c:2237:24 shift exponent 4294967295 is too large for 32-bit type 'int' The setting of the size_{shift, mask} and of the opcode are unnecessary when the erase size is zero, as throughout the code just the erase size is considered to determine whether an erase type is supported or not. Setting the opcode to 0xFF was wrong too as nobody guarantees that 0xFF is an unused opcode. Thus when masking out an erase type, just set the erase size to zero. This will fix the shift-out-of-bounds. [ta: refine changes, new commit message, fix compilation error]
Source: CVE Program / CVE List V5
CVSS Information
N/A
Source: CVE Program / CVE List V5
Vulnerability Type
N/A
Source: CVE Program / CVE List V5
Vulnerability Title
Linux kernel 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于屏蔽擦除类型时设置size_shift为-1,可能导致越界移位。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
Linux Linux 5390a8df769ec9ba9c995191bb0867430f602ebb ~ e6409208c13f7c56adc12dd795abf4141e3d5e64 -
Linux Linux 4.20 -

II. Public POCs for CVE-2023-54295

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2023-54295

请登录查看更多情报信息。

Other References for CVE-2023-54295 (5)

Same Patch Batch · Linux · 2025-12-30 · 244 CVEs total

CVE-2023-54184 9.8 CRITICAL scsi: target: iscsit: Free cmds before session free
CVE-2023-54223 9.8 CRITICAL net/mlx5e: xsk: Fix invalid buffer access for legacy rq
CVE-2023-54237 9.8 CRITICAL net/smc: fix potential panic dues to unprotected smc_llc_srv_add_link()
CVE-2023-54257 9.8 CRITICAL net: macb: fix a memory corruption in extended buffer descriptor mode
CVE-2023-54258 9.8 CRITICAL cifs: fix potential oops in cifs_oplock_break
CVE-2023-54269 9.8 CRITICAL SUNRPC: double free xprt_ctxt while still in use
CVE-2023-54280 9.8 CRITICAL cifs: fix potential race when tree connecting ipc
CVE-2023-54292 9.8 CRITICAL RDMA/irdma: Fix data race on CQP request done
CVE-2023-54203 9.1 CRITICAL ksmbd: fix slab-out-of-bounds in init_smb2_rsp_hdr
CVE-2022-50880 8.8 HIGH wifi: ath10k: add peer map clean up for peer delete in ath10k_sta_state()
CVE-2023-54262 8.8 HIGH net/mlx5e: Don't clone flow post action attributes second time
CVE-2023-54214 8.8 HIGH Bluetooth: L2CAP: Fix potential user-after-free
CVE-2023-54162 8.8 HIGH ksmbd: fix possible memory leak in smb2_lock()
CVE-2023-54318 8.8 HIGH net/smc: use smc_lgr_list.lock to protect smc_lgr_list.list iterate in smcr_port_add
CVE-2023-54250 8.2 HIGH ksmbd: avoid out of bounds access in decode_preauth_ctxt()
CVE-2023-54164 8.0 HIGH Bluetooth: ISO: fix iso_conn related locking and validity issues
CVE-2023-54206 7.8 HIGH net/sched: flower: fix filter idr initialization
CVE-2023-54202 7.8 HIGH drm/i915: fix race condition UAF in i915_perf_add_config_ioctl
CVE-2023-54210 7.8 HIGH Bluetooth: hci_sync: Avoid use-after-free in dbg for hci_remove_adv_monitor()
CVE-2023-54243 7.8 HIGH netfilter: ebtables: fix table blob use-after-free

Showing top 20 of 244 CVEs. View all on vendor page &rarr; →

IV. Related Vulnerabilities

V. Comments for CVE-2023-54295

No comments yet


Leave a comment