Description
In the Linux kernel, the following vulnerability has been resolved: erofs: fix use-after-free on sbi->sync_decompress z_erofs_decompress_kickoff() can race with filesystem unmount, causing a use-after-free on sbi->sync_decompress. When I/O completes, z_erofs_endio() calls z_erofs_decompress_kickoff() to queue z_erofs_decompressqueue_work() asynchronously. Then, after all folios are unlocked, unmount workflow can proceed and sbi will be freed before accessing to sbi->sync_decompress. Thread (unmount) I/O completion kworker queue_work z_erofs_decompressqueue_work (all folios are unlocked) cleanup_mnt .. erofs_kill_sb erofs_sb_free kfree(sbi) access sbi->sync_decompress // UAF!!
Affected products
Version statuses are supplied by the assigning organization. Consult the original record for detailed ranges and platform conditions.
Linux Linux
Default version status: unaffected
40452ffca3c1a0f2994e826f9fa213b107f1a2d4 to < 5627e57f1da68ff0146896eb3d2eed25e62adc44affected40452ffca3c1a0f2994e826f9fa213b107f1a2d4 to < 59db5d8bcc65e04d8598afd81ec3a18edb407470affected40452ffca3c1a0f2994e826f9fa213b107f1a2d4 to < 86ab00cf81d44b675bb23db62b88fd76c8ac8ceaaffected40452ffca3c1a0f2994e826f9fa213b107f1a2d4 to < 00bf6868df65fa95b3854996246d15759fdc7070affected40452ffca3c1a0f2994e826f9fa213b107f1a2d4 to < 95caf60da33d87ed26c28993620f0d92487b0296affected40452ffca3c1a0f2994e826f9fa213b107f1a2d4 to < 1aee05e814d292064bf5fa15733741040cdc48baaffected
Linux Linux
Default version status: affected
5.17affected0 to < 5.17unaffected6.1.191 to ≤ 6.1.*unaffected6.6.160 to ≤ 6.6.*unaffected6.12.94 to ≤ 6.12.*unaffected6.18.36 to ≤ 6.18.*unaffected7.0.13 to ≤ 7.0.*unaffected7.1 to ≤ *unaffected
References
- https://git.kernel.org/stable/c/5627e57f1da68ff0146896eb3d2eed25e62adc44 ↗
- https://git.kernel.org/stable/c/59db5d8bcc65e04d8598afd81ec3a18edb407470 ↗
- https://git.kernel.org/stable/c/86ab00cf81d44b675bb23db62b88fd76c8ac8cea ↗
- https://git.kernel.org/stable/c/00bf6868df65fa95b3854996246d15759fdc7070 ↗
- https://git.kernel.org/stable/c/95caf60da33d87ed26c28993620f0d92487b0296 ↗
- https://git.kernel.org/stable/c/1aee05e814d292064bf5fa15733741040cdc48ba ↗