lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1612194994-50994-1-git-send-email-driverfuzzing@gmail.com>
Date:   Mon,  1 Feb 2021 09:56:34 -0600
From:   Wenjia Zhao <driverfuzzing@...il.com>
To:     unlisted-recipients:; (no To-header on input)
Cc:     driverfuzzing@...il.com,
        Florian Tobias Schandinat <FlorianSchandinat@....de>,
        Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
        linux-fbdev@...r.kernel.org, dri-devel@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH 3/3] video: fbdev: fix the out-of-bounds access cr_data->bak

The size of cr_data->bak is CURSOR_SIZE/4, however the access size in
the is
CURSOR_SIZE in the loop. It causes the out-of-bounds access.

Signed-off-by: Wenjia Zhao <driverfuzzing@...il.com>
---
 drivers/video/fbdev/via/viafbdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/via/viafbdev.c b/drivers/video/fbdev/via/viafbdev.c
index 22deb34..ef217cc 100644
--- a/drivers/video/fbdev/via/viafbdev.c
+++ b/drivers/video/fbdev/via/viafbdev.c
@@ -839,7 +839,7 @@ static int viafb_cursor(struct fb_info *info, struct fb_cursor *cursor)
 	if (cursor->set & FB_CUR_SETSHAPE) {
 		struct {
 			u8 data[CURSOR_SIZE];
-			u32 bak[CURSOR_SIZE / 4];
+			u32 bak[CURSOR_SIZE];
 		} *cr_data = kzalloc(sizeof(*cr_data), GFP_ATOMIC);
 		int size = ((cursor->image.width + 7) >> 3) *
 			cursor->image.height;
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ