[PATCH 6.1 0/8] Backporting CVE-2025-38073 fix patch

Mahmoud Adam posted 8 patches 3 months, 2 weeks ago
block/bdev.c            |  17 +++++
block/blk-zoned.c       |   5 +-
block/fops.c            |  61 +++++++++++++++-
block/ioctl.c           |   6 ++
fs/ceph/file.c          |   2 -
fs/direct-io.c          |  10 +--
fs/ext4/file.c          |   9 +--
fs/f2fs/file.c          |   1 -
fs/iomap/direct-io.c    |  12 +---
fs/libfs.c              |  42 +++++++++++
fs/nfs/file.c           |   1 -
fs/nilfs2/the_nilfs.c   |   3 -
include/linux/fs.h      |   7 +-
include/linux/pagemap.h |   2 +
mm/filemap.c            | 154 +++++++++++++++++-----------------------
15 files changed, 205 insertions(+), 127 deletions(-)
[PATCH 6.1 0/8] Backporting CVE-2025-38073 fix patch
Posted by Mahmoud Adam 3 months, 2 weeks ago
This series aims to fix the CVE-2025-38073 for 6.1 LTS. Which is fixed
by c0e473a0d226 ("block: fix race between set_blocksize and read
paths"). This patch is built on top multiple refactors that where
merged on 6.6. The needed dependecies are:

  - e003f74afbd2 ("filemap: add a kiocb_invalidate_pages helper")
  - c402a9a9430b ("filemap: add a kiocb_invalidate_post_direct_write
    helper")
  - 182c25e9c157 ("filemap: update ki_pos in generic_perform_write")
  - 44fff0fa08ec ("fs: factor out a direct_write_fallback helper")
  - 727cfe976758 ("block: open code __generic_file_write_iter for
    blkdev writes")

Also backport follow up fixes:
- fb881cd76045 ("nilfs2: fix deadlock warnings caused by lock
  dependency in init_nilfs()").
- 8287474aa5ff ("direct_write_fallback(): on error revert the ->ki_pos
  update from buffered write")

Thanks,
MNAdam

Al Viro (1):
  direct_write_fallback(): on error revert the ->ki_pos update from
    buffered write

Christoph Hellwig (5):
  filemap: add a kiocb_invalidate_pages helper
  filemap: add a kiocb_invalidate_post_direct_write helper
  filemap: update ki_pos in generic_perform_write
  fs: factor out a direct_write_fallback helper
  block: open code __generic_file_write_iter for blkdev writes

Darrick J. Wong (1):
  block: fix race between set_blocksize and read paths

Ryusuke Konishi (1):
  nilfs2: fix deadlock warnings caused by lock dependency in
    init_nilfs()

 block/bdev.c            |  17 +++++
 block/blk-zoned.c       |   5 +-
 block/fops.c            |  61 +++++++++++++++-
 block/ioctl.c           |   6 ++
 fs/ceph/file.c          |   2 -
 fs/direct-io.c          |  10 +--
 fs/ext4/file.c          |   9 +--
 fs/f2fs/file.c          |   1 -
 fs/iomap/direct-io.c    |  12 +---
 fs/libfs.c              |  42 +++++++++++
 fs/nfs/file.c           |   1 -
 fs/nilfs2/the_nilfs.c   |   3 -
 include/linux/fs.h      |   7 +-
 include/linux/pagemap.h |   2 +
 mm/filemap.c            | 154 +++++++++++++++++-----------------------
 15 files changed, 205 insertions(+), 127 deletions(-)

-- 
2.47.3




Amazon Web Services Development Center Germany GmbH
Tamara-Danz-Str. 13
10243 Berlin
Geschaeftsfuehrung: Christian Schlaeger
Eingetragen am Amtsgericht Charlottenburg unter HRB 257764 B
Sitz: Berlin
Ust-ID: DE 365 538 597
Re: [PATCH 6.1 0/8] Backporting CVE-2025-38073 fix patch
Posted by Greg KH 3 months, 2 weeks ago
On Tue, Oct 21, 2025 at 09:03:35AM +0200, Mahmoud Adam wrote:
> This series aims to fix the CVE-2025-38073 for 6.1 LTS.

That's not going to work until there is a fix in the 6.6.y tree first.
You all know this quite well :(

Please work on that tree first, and then move to older ones.

thanks,

greg k-h
Re: [PATCH 6.1 0/8] Backporting CVE-2025-38073 fix patch
Posted by Mahmoud Nagy Adam 3 months, 2 weeks ago
Greg KH <gregkh@linuxfoundation.org> writes:

>
>
> On Tue, Oct 21, 2025 at 09:03:35AM +0200, Mahmoud Adam wrote:
>> This series aims to fix the CVE-2025-38073 for 6.1 LTS.
>
> That's not going to work until there is a fix in the 6.6.y tree first.
> You all know this quite well :(
>
> Please work on that tree first, and then move to older ones.
>

Yup, I've already sent a series for 6.6 yesterday:
https://lore.kernel.org/stable/20251020122541.7227-1-mngyadam@amazon.de/

- MNAdam



Amazon Web Services Development Center Germany GmbH
Tamara-Danz-Str. 13
10243 Berlin
Geschaeftsfuehrung: Christian Schlaeger
Eingetragen am Amtsgericht Charlottenburg unter HRB 257764 B
Sitz: Berlin
Ust-ID: DE 365 538 597
Re: [PATCH 6.1 0/8] Backporting CVE-2025-38073 fix patch
Posted by Greg KH 3 months, 2 weeks ago
On Tue, Oct 21, 2025 at 09:25:37AM +0200, Mahmoud Nagy Adam wrote:
> Greg KH <gregkh@linuxfoundation.org> writes:
> 
> >
> >
> > On Tue, Oct 21, 2025 at 09:03:35AM +0200, Mahmoud Adam wrote:
> >> This series aims to fix the CVE-2025-38073 for 6.1 LTS.
> >
> > That's not going to work until there is a fix in the 6.6.y tree first.
> > You all know this quite well :(
> >
> > Please work on that tree first, and then move to older ones.
> >
> 
> Yup, I've already sent a series for 6.6 yesterday:
> https://lore.kernel.org/stable/20251020122541.7227-1-mngyadam@amazon.de/

Ah, totally missed that as it was "just" a single backport, my fault.

Thanks for this, I'll review this when I get a chance.  How was this
tested?

greg k-h
Re: [PATCH 6.1 0/8] Backporting CVE-2025-38073 fix patch
Posted by Mahmoud Nagy Adam 3 months, 2 weeks ago
Greg KH <gregkh@linuxfoundation.org> writes:

> On Tue, Oct 21, 2025 at 09:25:37AM +0200, Mahmoud Nagy Adam wrote:
>> Greg KH <gregkh@linuxfoundation.org> writes:
>>
>> >
>> >
>> > On Tue, Oct 21, 2025 at 09:03:35AM +0200, Mahmoud Adam wrote:
>> >> This series aims to fix the CVE-2025-38073 for 6.1 LTS.
>> >
>> > That's not going to work until there is a fix in the 6.6.y tree first.
>> > You all know this quite well :(
>> >
>> > Please work on that tree first, and then move to older ones.
>> >
>>
>> Yup, I've already sent a series for 6.6 yesterday:
>> https://lore.kernel.org/stable/20251020122541.7227-1-mngyadam@amazon.de/
>
> Ah, totally missed that as it was "just" a single backport, my fault.
>

6.6 had all the required dependencies already so it was fortunately a
simpler series :). I'll make sure to reference the other series in the
future as well.

> Thanks for this, I'll review this when I get a chance.  How was this
> tested?

This was tested by our internal testing over various EC2 instances
(x86_64 & ARM). Our testing includes running kselftests, fstests, LTP
suites.

If there are specific tests you’d like me to run or results to provide,
please let me know.

Thanks,
MNAdam



Amazon Web Services Development Center Germany GmbH
Tamara-Danz-Str. 13
10243 Berlin
Geschaeftsfuehrung: Christian Schlaeger
Eingetragen am Amtsgericht Charlottenburg unter HRB 257764 B
Sitz: Berlin
Ust-ID: DE 365 538 597