erofs: unify lcn as u64 for 32-bit platforms
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 152a333a589560bee002e4c96761f1b560a5793c · < 2d8c7edcb661812249469f4a5b62e9339118846f| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
erofs: unify lcn as u64 for 32-bit platforms
As sashiko reported [1], `lcn` was typed as `unsigned long` (or `unsigned int` sometimes), which is only 32 bits wide on 32-bit platforms, which causes `(lcn << lclusterbits)` to be truncated at 4 GiB.
In order to consolidate the logic, just use `u64` consistently around the codebase.
[1] https://sashiko.dev/r/20260420034612.1899973-1-hsiangkao%40linux.alibaba.com
From the CVE record · Linux
On 32-bit platforms, erofs used a 32-bit type for `lcn`, causing `(lcn << lclusterbits)` to be truncated at 4 GiB. The input does not specify an attacker action, access requirements, or whether user interaction is needed.
Anyone running the Linux kernel with erofs on a 32-bit platform should check their kernel version; affected versions are not specified.