CVE-2022-49062: cachefiles: Fix KASAN slab-out-of-bounds in cachefiles_set_volume_xattr

Published Feb 26, 2025
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

cachefiles: Fix KASAN slab-out-of-bounds in cachefilessetvolumexattr

Use the actual length of volume coherency data when setting the xattr to avoid the following KASAN report.

BUG: KASAN: slab-out-of-bounds in cachefilessetvolumexattr+0xa0/0x350 [cachefiles] Write of size 4 at addr ffff888101e02af4 by task kworker/6:0/1347

CPU: 6 PID: 1347 Comm: kworker/6:0 Kdump: loaded Not tainted 5.18.0-rc1-nfs-fscache-netfs+ #13 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-4.fc34 04/01/2014 Workqueue: events fscachecreatevolumework [fscache] Call Trace: <TASK> dumpstacklvl+0x45/0x5a printreport.cold+0x5e/0x5db ? locktextstart+0x8/0x8 ? cachefilessetvolumexattr+0xa0/0x350 [cachefiles] kasanreport+0xab/0x120 ? cachefilessetvolumexattr+0xa0/0x350 [cachefiles] kasancheckrange+0xf5/0x1d0 memcpy+0x39/0x60 cachefilessetvolumexattr+0xa0/0x350 [cachefiles] cachefilesacquirevolume+0x2be/0x500 [cachefiles] ? cachefilesfreevolume+0x90/0x90 [cachefiles] fscachecreatevolumework+0x68/0x160 [fscache] processonework+0x3b7/0x6a0 workerthread+0x2c4/0x650 ? processonework+0x6a0/0x6a0 kthread+0x16c/0x1a0 ? kthreadcompleteandexit+0x20/0x20 retfromfork+0x22/0x30 </TASK>

Allocated by task 1347: kasansavestack+0x1e/0x40 kasankmalloc+0x81/0xa0 cachefilessetvolumexattr+0x76/0x350 [cachefiles] cachefilesacquirevolume+0x2be/0x500 [cachefiles] fscachecreatevolumework+0x68/0x160 [fscache] processonework+0x3b7/0x6a0 workerthread+0x2c4/0x650 kthread+0x16c/0x1a0 retfromfork+0x22/0x30

The buggy address belongs to the object at ffff888101e02af0 which belongs to the cache kmalloc-8 of size 8 The buggy address is located 4 bytes inside of 8-byte region [ffff888101e02af0, ffff888101e02af8)

The buggy address belongs to the physical page: page:00000000a2292d70 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101e02 flags: 0x17ffffc0000200(slab|node=0|zone=2|lastcpupid=0x1fffff) raw: 0017ffffc0000200 0000000000000000 dead000000000001 ffff888100042280 raw: 0000000000000000 0000000080660066 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected

Memory state around the buggy address: ffff888101e02980: fc 00 fc fc fc fc 00 fc fc fc fc 00 fc fc fc fc ffff888101e02a00: 00 fc fc fc fc 00 fc fc fc fc 00 fc fc fc fc 00 >ffff888101e02a80: fc fc fc fc 00 fc fc fc fc 00 fc fc fc fc 04 fc ^ ffff888101e02b00: fc fc fc 00 fc fc fc fc 00 fc fc fc fc 00 fc fc ffff888101e02b80: fc fc 00 fc fc fc fc 00 fc fc fc fc 00 fc fc fc ==================================================================

Affected Software

8 affected componentsFixes available
Linux Kernel
Linux Linux kernel>=5.17<5.17.4
Linux Linux kernel=5.18-rc1
Linux Linux kernel=5.18-rc2
debian/linux<5.17.6-1
5.17.6-1
debian/linux<5.17.6-1
5.17.6-1
debian/linux<5.17.6-1
5.17.6-1
debian/linux
5.17.6-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 5.17.6-1
  2. Compensating control

    In the Linux kernel cachefiles component, modify cachefiles_set_volume_xattr to use the actual length of the volume coherency data when setting the xattr, preventing the slab-out-of-bounds write.

Event History

Feb 26, 2025
CVE Published
via MITRE·01:54 AM
Data Sourced
via MITRE·01:54 AM
Description
Data Sourced
via NVD·07:00 AM
Description
Data Sourced
via OSV·07:00 AM
DescriptionSeverityAffected Software
Mar 18, 2025
Data Sourced
via NVD·06:32 PM
RemedySeverityWeaknessAffected Software
Oct 1, 2025
Updated
via NVD·08:15 PM
SeverityWeaknessAffected Software
Aug 4, 2026
Data Sourced
via MITRE·09:03 AM
Severity

Frequently Asked Questions

1

What is the severity of CVE-2022-49062?

CVE-2022-49062 is classified as a high severity vulnerability due to its potential to cause a slab-out-of-bounds condition in the Linux kernel.

2

How do I fix CVE-2022-49062?

To fix CVE-2022-49062, update your Linux kernel to versions 5.17.4 or later, or 5.18-rc1 and 5.18-rc2.

3

What software versions are affected by CVE-2022-49062?

CVE-2022-49062 affects the Linux kernel versions 5.17 up to 5.17.4 and versions 5.18-rc1 and 5.18-rc2.

4

What type of vulnerability is CVE-2022-49062?

CVE-2022-49062 is a memory corruption vulnerability specifically related to slab-out-of-bounds access.

5

Who is impacted by CVE-2022-49062?

Users and administrators running affected versions of the Linux kernel are impacted by CVE-2022-49062.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203