[PATCH] mtd: jedec_probe: fix shift-out-of-bounds UB in JEDEC ID masking

Miquel Raynal miquel.raynal at bootlin.com
Thu Jan 22 06:08:58 PST 2026


On Wed, 21 Jan 2026 20:32:50 -0500, Chenxi Hou wrote:
> UBSAN reports shift-out-of-bounds in jedec_read_mfr() and jedec_read_id():
> 
>   UBSAN: shift-out-of-bounds in drivers/mtd/chips/jedec_probe.c:1924:13
>   shift exponent 32 is too large for 32-bit type 'int'
>   UBSAN: shift-out-of-bounds in drivers/mtd/chips/jedec_probe.c:1940:12
>   shift exponent 32 is too large for 32-bit type 'int'
> 
> [...]

Applied to mtd/next, thanks!

[1/1] mtd: jedec_probe: fix shift-out-of-bounds UB in JEDEC ID masking
      commit: 2b14660c1caf0b67adf99428a225f71ed653437d

Patche(s) should be available on mtd/linux.git and will be
part of the next PR (provided that no robot complains by then).

Kind regards,
Miquèl




More information about the linux-mtd mailing list