mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [BUG] Buffer Overflow in drivers/video/fbmem.c
@ 2013-09-23 11:32 徐永健
  2013-09-26 21:14 ` Andrew Morton
  0 siblings, 1 reply; 2+ messages in thread
From: 徐永健 @ 2013-09-23 11:32 UTC (permalink / raw)
  To: linux-kernel

Hi,
Buffer overflow found in drivers/video/fbmem.c.
[Version]:Newest

[Detail]:
1592 static int do_register_framebuffer(struct fb_info *fb_info)
1593 {
1594 |   int i;
1595 |   struct fb_event event;
1596 |   struct fb_videomode mode;
........
1607 |   num_registered_fb++;
1608 |   for (i = 0 ; i < FB_MAX; i++)    //******* i could be FB_MAX
after loop *********/
1609 |   |   if (!registered_fb[i])
1610 |   |   |   break;
........

1646 |   fb_var_to_videomode(&mode, &fb_info->var);
1647 |   fb_add_videomode(&mode, &fb_info->modelist);
1648 |   registered_fb[i] = fb_info;          // ****** Here will be a
off-by-one overflow  *******/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-09-26 21:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-23 11:32 [BUG] Buffer Overflow in drivers/video/fbmem.c 徐永健
2013-09-26 21:14 ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®