CVE-2024-27070: f2fs: fix to avoid use-after-free issue in f2fs_filemap_fault

Published May 1, 2024
·
Updated

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

f2fs: fix to avoid use-after-free issue in f2fsfilemapfault

syzbot reports a f2fs bug as below:

BUG: KASAN: slab-use-after-free in f2fsfilemapfault+0xd1/0x2c0 fs/f2fs/file.c:49 Read of size 8 at addr ffff88807bb22680 by task syz-executor184/5058

CPU: 0 PID: 5058 Comm: syz-executor184 Not tainted 6.7.0-syzkaller-09928-g052d534373b7 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 Call Trace: <TASK> dumpstack lib/dumpstack.c:88 [inline] dumpstacklvl+0x1e7/0x2d0 lib/dumpstack.c:106 printaddressdescription mm/kasan/report.c:377 [inline] printreport+0x163/0x540 mm/kasan/report.c:488 kasanreport+0x142/0x170 mm/kasan/report.c:601 f2fsfilemapfault+0xd1/0x2c0 fs/f2fs/file.c:49 dofault+0x131/0x450 mm/memory.c:4376 dosharedfault mm/memory.c:4798 [inline] dofault mm/memory.c:4872 [inline] doptemissing mm/memory.c:3745 [inline] handleptefault mm/memory.c:5144 [inline] handlemmfault+0x23b7/0x72b0 mm/memory.c:5285 handlemmfault+0x27e/0x770 mm/memory.c:5450 douseraddrfault arch/x86/mm/fault.c:1364 [inline] handlepagefault arch/x86/mm/fault.c:1507 [inline] excpagefault+0x456/0x870 arch/x86/mm/fault.c:1563 asmexcpagefault+0x26/0x30 arch/x86/include/asm/idtentry.h:570

The root cause is: in f2fsfilemapfault(), vmf->vma may be not alive after filemapfault(), so it may cause use-after-free issue when accessing vmf->vma->vmflags in tracef2fsfilemapfault(). So it needs to keep vmflags in separated temporary variable for tracepoint use.

Affected Software

2 affected componentsFixes available
Linux Linux kernel>=6.8<6.8.2
debian/linux
5.10.223-15.10.234-16.1.129-16.1.135-16.12.25-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.10.223-1Fixed in 5.10.234-1Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.25-1
  2. Upgrade

    Upgrade Linux kernel (f2fs) to a version that resolves this vulnerability.

    Fixed in 6.7.0-syzkaller-09928-g052d534373b7

Event History

May 1, 2024
CVE Published
via MITRE·01:04 PM
Data Sourced
via MITRE·01:04 PM
DescriptionSeverity
Data Sourced
via NVD·01:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Jun 8, 2024
Data Sourced
via Launchpad·01:13 AM
Description
Jan 2, 2025
Data Sourced
via Ubuntu·06:41 AM
RemedyDescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2024-27070?

CVE-2024-27070 has been classified with a high severity due to the potential for exploitation through a use-after-free vulnerability.

2

How do I fix CVE-2024-27070?

To fix CVE-2024-27070, update your Linux kernel to a version that includes the patch, such as 5.10.223-1, 6.1.123-1, or 6.12.12-1.

3

What systems are affected by CVE-2024-27070?

CVE-2024-27070 affects various versions of the Linux kernel, specifically versions between 6.0 and 6.8.2.

4

What impact does CVE-2024-27070 have on system security?

CVE-2024-27070 could lead to unauthorized memory access, potentially allowing malicious actors to execute arbitrary code.

5

Is there a known exploitation of CVE-2024-27070?

As of now, there have been no publicly reported exploits of CVE-2024-27070, but the vulnerability's nature makes it a target for future attacks.

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