Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1313332 > unrolled thread

[PATCH] ext4: fix potential integer overflow

Started byInsu Yun <wuninsu@gmail.com>
First post2016-01-20 17:20 +0100
Last post2016-01-20 17:20 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] ext4: fix potential integer overflow Insu Yun <wuninsu@gmail.com> - 2016-01-20 17:20 +0100

#1313332 — [PATCH] ext4: fix potential integer overflow

FromInsu Yun <wuninsu@gmail.com>
Date2016-01-20 17:20 +0100
Subject[PATCH] ext4: fix potential integer overflow
Message-ID<qT3Ee-yP-19@gated-at.bofh.it>
Since sizeof(ext_new_group_data) > sizeof(ext_new_flex_group_data),
integer overflow could be happened.
Therefore, need to fix integer overflow sanitization.

Signed-off-by: Insu Yun <wuninsu@gmail.com>
---
 fs/ext4/resize.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
index ad62d7a..34038e3 100644
--- a/fs/ext4/resize.c
+++ b/fs/ext4/resize.c
@@ -198,7 +198,7 @@ static struct ext4_new_flex_group_data *alloc_flex_gd(unsigned long flexbg_size)
 	if (flex_gd == NULL)
 		goto out3;
 
-	if (flexbg_size >= UINT_MAX / sizeof(struct ext4_new_flex_group_data))
+	if (flexbg_size >= UINT_MAX / sizeof(struct ext4_new_group_data))
 		goto out2;
 	flex_gd->count = flexbg_size;
 
-- 
1.9.1

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web