* [PATCH] ext4: fix potential integer overflow
@ 2016-01-20 16:18 Insu Yun
2016-02-12 6:16 ` Theodore Ts'o
0 siblings, 1 reply; 2+ messages in thread
From: Insu Yun @ 2016-01-20 16:18 UTC (permalink / raw)
To: tytso, adilger.kernel, linux-ext4, linux-kernel
Cc: taesoo, yeongjin.jang, insu, changwoo, Insu Yun
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ext4: fix potential integer overflow
2016-01-20 16:18 [PATCH] ext4: fix potential integer overflow Insu Yun
@ 2016-02-12 6:16 ` Theodore Ts'o
0 siblings, 0 replies; 2+ messages in thread
From: Theodore Ts'o @ 2016-02-12 6:16 UTC (permalink / raw)
To: Insu Yun
Cc: adilger.kernel, linux-ext4, linux-kernel, taesoo, yeongjin.jang,
insu, changwoo
On Wed, Jan 20, 2016 at 11:18:08AM -0500, Insu Yun wrote:
> 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>
Thanks, applied.
- Ted
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-02-12 6:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-20 16:18 [PATCH] ext4: fix potential integer overflow Insu Yun
2016-02-12 6:16 ` Theodore Ts'o
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).