+ ntfs-fix-use-after-free-in-ntfs_ucsncmp-v3.patch added to mm-hotfixes-unstable branch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: ntfs-fix-use-after-free-in-ntfs_ucsncmp-v3
has been added to the -mm mm-hotfixes-unstable branch.  Its filename is
     ntfs-fix-use-after-free-in-ntfs_ucsncmp-v3.patch

This patch will shortly appear at
     https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/ntfs-fix-use-after-free-in-ntfs_ucsncmp-v3.patch

This patch will later appear in the mm-hotfixes-unstable branch at
    git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days

------------------------------------------------------
From: ChenXiaoSong <chenxiaosong2@xxxxxxxxxx>
Subject: ntfs-fix-use-after-free-in-ntfs_ucsncmp-v3
Date: Sat, 9 Jul 2022 14:45:11 +0800

Cleanup quggested by Hawkins Jiawei

Link: https://lkml.kernel.org/r/20220709064511.3304299-1-chenxiaosong2@xxxxxxxxxx
Signed-off-by: ChenXiaoSong <chenxiaosong2@xxxxxxxxxx>
Signed-off-by: Hawkins Jiawei <yin31149@xxxxxxxxx>
Cc: Anton Altaparmakov <anton@xxxxxxxxxx>
Cc: Yongqiang Liu <liuyongqiang13@xxxxxxxxxx>
Cc: Zhang Xiaoxu <zhangxiaoxu5@xxxxxxxxxx>
Cc: Zhang Yi <yi.zhang@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/ntfs/attrib.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/fs/ntfs/attrib.c~ntfs-fix-use-after-free-in-ntfs_ucsncmp-v3
+++ a/fs/ntfs/attrib.c
@@ -595,7 +595,7 @@ static int ntfs_attr_find(const ATTR_TYP
 		u8 *mrec_end = (u8 *)ctx->mrec +
 		               le32_to_cpu(ctx->mrec->bytes_allocated);
 		u8 *name_end = (u8 *)a + le16_to_cpu(a->name_offset) +
-		               a->name_length;
+		               a->name_length * sizeof(ntfschar);
 		if ((u8*)a < (u8*)ctx->mrec || (u8*)a > mrec_end ||
 		    name_end > mrec_end)
 			break;
_

Patches currently in -mm which might be from chenxiaosong2@xxxxxxxxxx are

ntfs-fix-use-after-free-in-ntfs_ucsncmp.patch
ntfs-fix-use-after-free-in-ntfs_ucsncmp-v3.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux