+ hfs-fix-array-out-of-bounds-read-of-array-extent.patch added to -mm tree

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

 



The patch titled
     Subject: fs/hfs/extent.c: fix array out of bounds read of array extent
has been added to the -mm tree.  Its filename is
     hfs-fix-array-out-of-bounds-read-of-array-extent.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/hfs-fix-array-out-of-bounds-read-of-array-extent.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/hfs-fix-array-out-of-bounds-read-of-array-extent.patch

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 and is updated
there every 3-4 working days

------------------------------------------------------
From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
Subject: fs/hfs/extent.c: fix array out of bounds read of array extent

Currently extent and index i are both being incremented causing an array
out of bounds read on extent[i].  Fix this by removing the extraneous
increment of extent.

Detected by CoverityScan, CID#711541 ("Out of bounds read")

Link: http://lkml.kernel.org/r/20180831140538.31566-1-colin.king@xxxxxxxxxxxxx
Fixes: 7cb74be6fd827e314f8 ("HFS rewrite")
Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>
Reviewed-by: Ernesto A. Fernndez <ernesto.mnd.fernandez@xxxxxxxxx>
Cc: David Howells <dhowells@xxxxxxxxxx>
Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
Cc: Hin-Tak Leung <htl10@xxxxxxxxxxxxxxxxxxxxx>
Cc: Vyacheslav Dubeyko <slava@xxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

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

--- a/fs/hfs/extent.c~hfs-fix-array-out-of-bounds-read-of-array-extent
+++ a/fs/hfs/extent.c
@@ -304,7 +304,7 @@ int hfs_free_fork(struct super_block *sb
 		return 0;
 
 	blocks = 0;
-	for (i = 0; i < 3; extent++, i++)
+	for (i = 0; i < 3; i++)
 		blocks += be16_to_cpu(extent[i].count);
 
 	res = hfs_free_extents(sb, extent, blocks, blocks);
_

Patches currently in -mm which might be from colin.king@xxxxxxxxxxxxx are

ocfs2-remove-unused-pointer-eb.patch
hfs-fix-array-out-of-bounds-read-of-array-extent.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