CVE-2022-49360: f2fs: fix to do sanity check on total_data_blocks

Published Feb 26, 2025
·
Updated

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

f2fs: fix to do sanity check on totaldatablocks

As Yanming reported in bugzilla:

https://bugzilla.kernel.org/showbug.cgi?id=215916

The kernel message is shown below:

kernel BUG at fs/f2fs/segment.c:2560! Call Trace: allocatesegmentbydefault+0x228/0x440 f2fsallocatedatablock+0x13d1/0x31f0 dowritepage+0x18d/0x710 f2fsoutplacewritedata+0x151/0x250 f2fsdowritedatapage+0xef9/0x1980 movedatapage+0x6af/0xbc0 dogarbagecollect+0x312f/0x46f0 f2fsgc+0x6b0/0x3bc0 f2fsbalancefs+0x921/0x2260 f2fswritesingledatapage+0x16be/0x2370 f2fswritecachepages+0x428/0xd00 f2fswritedatapages+0x96e/0xd50 dowritepages+0x168/0x550 writebacksingleinode+0x9f/0x870 writebacksbinodes+0x47d/0xb20 writebackinodeswb+0xb2/0x200 wbwriteback+0x4bd/0x660 wbworkfn+0x5f3/0xab0 processonework+0x79f/0x13e0 workerthread+0x89/0xf60 kthread+0x26a/0x300 retfromfork+0x22/0x30 RIP: 0010:newcurseg+0xe8d/0x15f0

The root cause is: ckpt.validblockcount is inconsistent with SIT table, stat info indicates filesystem has free blocks, but SIT table indicates filesystem has no free segment.

So that during garbage colloection, it triggers panic when LFS allocator fails to find free segment.

This patch tries to fix this issue by checking consistency in between ckpt.validblockcount and block accounted from SIT.

Affected Software

5 affected components
Linux Kernel
Linux Linux kernel>=3.8<5.10.121
Linux Linux kernel>=5.11<5.15.46
Linux Linux kernel>=5.16<5.17.14
Linux Linux kernel>=5.18<5.18.3

Event History

Feb 26, 2025
CVE Published
via MITRE·02:11 AM
Data Sourced
via MITRE·02:11 AM
Description
Data Sourced
via NVD·07:01 AM
RemedyDescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2022-49360?

CVE-2022-49360 has not been assigned a specific CVSS score, but it is categorized as a kernel vulnerability that could affect system stability.

2

What does CVE-2022-49360 affect?

CVE-2022-49360 affects the Linux kernel, specifically the f2fs (Flash-Friendly File System) implementation.

3

How do I fix CVE-2022-49360?

To fix CVE-2022-49360, users should update the Linux kernel to the latest patched version available from their distribution.

4

What is the nature of the vulnerability in CVE-2022-49360?

CVE-2022-49360 involves a lack of proper sanity checks on total_data_blocks in the f2fs implementation of the Linux kernel.

5

Who reported CVE-2022-49360?

CVE-2022-49360 was reported by a user named Yanming on the Linux kernel bug tracking platform.

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