Look up another CVE · open CVE-2024-56565 in the interactive tracker
CVE-2024-56565
f2fs: fix to drop all discards after creating snapshot on lvm device
Published 2024-12-27 (22 months ago) by the Linux kernel CNA. Subsystem fs/f2fs. Debian urgency: not yet assigned.
What to do, per Debian release
Debian's own status for CVE-2024-56565 in every release this site tracks, and what each one means in practice. Every status below is the one the Debian Security Team publishes for this CVE. source
| Release | Status | Version | What this means |
|---|---|---|---|
| Debian 12bookworm | vulnerable | 6.1.190-1 | No fix published anywhere yet, neither in Debian nor upstream for the series bookworm tracks. Watch the Debian tracker page for this CVE. Advisories for bookworm have historically landed a median of 23 days after publication. |
| Debian 13trixie | fixed | 6.12.5-1 | Update the kernel and reboot. Fixed in 6.12.5-1. A running kernel keeps the old code until the machine restarts. |
| Debian 14forky | fixed | 6.12.5-1 | Update the kernel and reboot. Fixed in 6.12.5-1. A running kernel keeps the old code until the machine restarts. |
| Debian unstablesid | fixed | 6.12.5-1 | Update the kernel and reboot. Fixed in 6.12.5-1. A running kernel keeps the old code until the machine restarts. |
The vulnerability
What the bug is
Piergiorgio reported a bug in bugzilla as below: ------------[ cut here ]------------ WARNING: CPU: 2 PID: 969 at fs/f2fs/segment.c:1330 RIP: 0010:__submit_discard_cmd+0x27d/0x400 [f2fs] Call Trace: __issue_discard_cmd+0x1ca/0x350 [f2fs] issue_discard_thread+0x191/0x480 [f2fs] kthread+0xcf/0x100 ret_from_fork+0x31/0x50 ret_from_fork_asm+0x1a/0x30 w/ below testcase, it can reproduce this bug quickly: - pvcreate /dev/vdb - vgcreate myvg1 /dev/vdb - lvcreate -L 1024m -n mylv1 myvg1 - mount /dev/myvg1/mylv1 /mnt/f2fs - dd if=/dev/zero of=/mnt/f2fs/file bs=1M count=20 - sync - rm /mnt/f2fs/file - sync - lvcreate -L 1024m -s -n mylv1-snapshot /dev/myvg1/mylv1 - umount /mnt/f2fs The root cause is: it will update discard_max_bytes of mounted lvm device to zero after creating snapshot on this lvm device, then, __submit_discard_cmd() will pass parameter @nr_sects w/ zero value to __blkdev_issue_discard(), it returns a NULL bio pointer, result in panic. This patch changes as below for fixing: 1. Let's drop all remained discards in f2fs_unfreeze() if snapshot of lvm device is created. 2. Checking discard_max_bytes before submitting discard during __submit_discard_cmd().
Where it lives
The fix touches these files. If the subsystem is one you do not use, the practical exposure is lower, though the package is still the vulnerable one.
fs/f2fs/segment.c
fs/f2fs/super.c
- What this is
- F2FS FILE SYSTEMMAINTAINERS section matched on fs/f2fs/ · linux-f2fs-devel@lists.sourceforge.net · Maintained
- Kernel module
- f2fs
Check it on the machine
grep -w CONFIG_F2FS_FS /boot/config-$(uname -r)Reads the booted kernel's own configuration, on the machine and nowhere else. =y is built in, =m is a module, and an is not set line means the code is not there.
lsmod | grep -w f2fsPrints a line if that module is loaded right now, and nothing if it is not. One that is not loaded can still be loaded later by anything that needs it.
Show whether Debian builds this, per release
Debian builds this, but not on every flavour. At least one release below builds the code on some of its kernel flavours and not on others, so the answer depends on the architecture and flavour installed.
- bookworm, trixie, forky, sidMnot built on amd64/cloud-amd64, arm64/cloud-arm64
- M
- a module where it is built at all; some flavours do not build it
- Build switch
- CONFIG_F2FS_FS
From the configuration Debian publishes for every kernel flavour it builds. It covers only the architectures Debian ships a linux-config package for, and nothing about a kernel you built yourself. Debian's own status above stays authoritative about the source package.MAINTAINERS kbuild Makefiles Debian linux-config packages
Signals
- Published
- 2024-12-27 (22 months ago)source
- CVSS
- no vector published, unrated
- Attack vector
- not published
- EPSS
- 0.22%, higher than 11.6% of all CVEssource
- CISA KEV
- not listedthe KEV catalogue
- Debian urgency
- not yet assignedsource
- Subsystem
- fs/f2fs
Upstream fixes
The versions the CNA records as introducing and fixing this, and the commit for each. source
| Introduced | Fixed in | Commit |
|---|---|---|
| 4.19 | 6.6.66 | ed24ab98242f |
| 4.19 | 6.12.4 | 15136c3861a3 |
| 4.19 | 6.13 | bc8aeb04fd80 |
Why the CNA scored it this way
The kernel CNA published no CVSS vector and no reasoning for CVE-2024-56565, which is why it is shown as unrated rather than given an invented score. 6,405 of the 20,413 CVEs here carry reasoning; this is not one of them.