[<prev] [next>] [day] [month] [year] [list]
Message-ID: <2025011945-CVE-2025-21643-f3f6@gregkh>
Date: Sun, 19 Jan 2025 11:17:52 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-cve-announce@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: CVE-2025-21643: netfs: Fix kernel async DIO
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
netfs: Fix kernel async DIO
Netfslib needs to be able to handle kernel-initiated asynchronous DIO that
is supplied with a bio_vec[] array. Currently, because of the async flag,
this gets passed to netfs_extract_user_iter() which throws a warning and
fails because it only handles IOVEC and UBUF iterators. This can be
triggered through a combination of cifs and a loopback blockdev with
something like:
mount //my/cifs/share /foo
dd if=/dev/zero of=/foo/m0 bs=4K count=1K
losetup --sector-size 4096 --direct-io=on /dev/loop2046 /foo/m0
echo hello >/dev/loop2046
This causes the following to appear in syslog:
WARNING: CPU: 2 PID: 109 at fs/netfs/iterator.c:50 netfs_extract_user_iter+0x170/0x250 [netfs]
and the write to fail.
Fix this by removing the check in netfs_unbuffered_write_iter_locked() that
causes async kernel DIO writes to be handled as userspace writes. Note
that this change relies on the kernel caller maintaining the existence of
the bio_vec array (or kvec[] or folio_queue) until the op is complete.
The Linux kernel CVE team has assigned CVE-2025-21643 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.8 with commit 153a9961b551101cd38e94e26cd92fbfd198b19b and fixed in 6.12.10 with commit 9f3a265836844eda30bf34c2584b8011fd4f0f49
Issue introduced in 6.8 with commit 153a9961b551101cd38e94e26cd92fbfd198b19b and fixed in 6.13-rc7 with commit 3f6bc9e3ab9b127171d39f9ac6eca1abb693b731
Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to
older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2025-21643
will be updated if fixes are backported, please check that for the most
up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
fs/netfs/direct_write.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes. Individual
changes are never tested alone, but rather are part of a larger kernel
release. Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all. If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
https://git.kernel.org/stable/c/9f3a265836844eda30bf34c2584b8011fd4f0f49
https://git.kernel.org/stable/c/3f6bc9e3ab9b127171d39f9ac6eca1abb693b731
Powered by blists - more mailing lists