Skip to content

Commit

Permalink
video: fbdev: fix OOB read in vga_8planes_imageblit()
Browse files Browse the repository at this point in the history
syzbot is reporting OOB read at vga_8planes_imageblit() [1], for
"cdat[y] >> 4" can become a negative value due to "const char *cdat".

[1] https://syzkaller.appspot.com/bug?id=0d7a0da1557dcd1989e00cb3692b26d4173b4132

Reported-by: syzbot <syzbot+69fbd3e01470f169c8c4@syzkaller.appspotmail.com>
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/90b55ec3-d5b0-3307-9f7c-7ff5c5fd6ad3@i-love.sakura.ne.jp
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Tetsuo Handa authored and Greg Kroah-Hartman committed Sep 4, 2020
1 parent 42f0781 commit bd018a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/video/fbdev/vga16fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1121,7 +1121,7 @@ static void vga_8planes_imageblit(struct fb_info *info, const struct fb_image *i
char oldop = setop(0);
char oldsr = setsr(0);
char oldmask = selectmask();
const char *cdat = image->data;
const unsigned char *cdat = image->data;
u32 dx = image->dx;
char __iomem *where;
int y;
Expand Down

0 comments on commit bd018a6

Please sign in to comment.