提交 5510f2d2 编写于 作者: V Vlad Tsyrklevich 提交者: Xie XiuQi

omap2fb: Fix stack memory disclosure

commit a01421e4 upstream.

Using [1] for static analysis I found that the OMAPFB_QUERY_PLANE,
OMAPFB_GET_COLOR_KEY, OMAPFB_GET_DISPLAY_INFO, and OMAPFB_GET_VRAM_INFO
cases could all leak uninitialized stack memory--either due to
uninitialized padding or 'reserved' fields.

Fix them by clearing the shared union used to store copied out data.

[1] https://github.com/vlad902/kernel-uninitialized-memory-checkerSigned-off-by: NVlad Tsyrklevich <vlad@tsyrklevich.net>
Reviewed-by: NKees Cook <keescook@chromium.org>
Fixes: b39a982d ("OMAP: DSS2: omapfb driver")
Cc: security@kernel.org
[b.zolnierkie: prefix patch subject with "omap2fb: "]
Signed-off-by: NBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 a6df0d7e
...@@ -609,6 +609,8 @@ int omapfb_ioctl(struct fb_info *fbi, unsigned int cmd, unsigned long arg) ...@@ -609,6 +609,8 @@ int omapfb_ioctl(struct fb_info *fbi, unsigned int cmd, unsigned long arg)
int r = 0; int r = 0;
memset(&p, 0, sizeof(p));
switch (cmd) { switch (cmd) {
case OMAPFB_SYNC_GFX: case OMAPFB_SYNC_GFX:
DBG("ioctl SYNC_GFX\n"); DBG("ioctl SYNC_GFX\n");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册