erofs: handle NONHEAD !delta[1] lclusters gracefully
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
96a85becb811ca2ce21a21721f1544d342ae431e| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
erofs: handle NONHEAD !delta[1] lclusters gracefully
syzbot reported a WARNING in iomap_iter_done: iomap_fiemap+0x73b/0x9b0 fs/iomap/fiemap.c:80 ioctl_fiemap fs/ioctl.c:220 [inline]
Generally, NONHEAD lclusters won't have delta[1]==0, except for crafted images and filesystems created by pre-1.0 mkfs versions.
Previously, it would immediately bail out if delta[1]==0, which led to inadequate decompressed lengths (thus FIEMAP is impacted). Treat it as delta[1]=1 to work around these legacy mkfs versions.
`lclusterbits > 14` is illegal for compact indexes, error out too.
From the CVE record · Linux
The Linux kernel’s erofs filesystem can report inadequate decompressed lengths through FIEMAP and trigger a kernel warning when handling certain lclusters. This can occur with crafted images or filesystems created by pre-1.0 mkfs versions; the input does not specify authentication requirements or whether user interaction is needed.
Engineers running Linux kernels that process erofs images, particularly images made with pre-1.0 mkfs versions, should check whether their kernel is affected; affected kernel versions are not specified.