public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] media: rc: ir-lirc-codec: fix potential integer overflow
@ 2010-12-02  4:51 Dan Carpenter
  2010-12-02 15:00 ` Jarod Wilson
  2010-12-04 21:05 ` [PATCH v2] media: rc: ir-lirc-codec: fix " Vasiliy Kulikov
  0 siblings, 2 replies; 5+ messages in thread
From: Dan Carpenter @ 2010-12-02  4:51 UTC (permalink / raw)
  To: Vasiliy Kulikov
  Cc: kernel-janitors, Mauro Carvalho Chehab, David Härdeman,
	Jarod Wilson, linux-media, linux-kernel

On Fri, Nov 26, 2010 at 08:06:35PM +0300, Vasiliy Kulikov wrote:
>  	count = n / sizeof(int);
> -	if (count > LIRCBUF_SIZE || count % 2 == 0)
> +	if (count > LIRCBUF_SIZE || count % 2 == 0 || n % sizeof(int) != 0)
                                                      ^^^^^^^^^^^^^^^^^^^^

Wait, what?  We just checked this a couple lines before.

The rest of the patch is right and a clever catch.  It would affect 
x86_64 systems and not i386.  This doesn't have security implications
does it?  You'd just catch the kmalloc() stack trace for insanely large
allocations.

regards,
dan carpenter


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

end of thread, other threads:[~2010-12-08 16:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-02  4:51 [PATCH] media: rc: ir-lirc-codec: fix potential integer overflow Dan Carpenter
2010-12-02 15:00 ` Jarod Wilson
2010-12-02 18:55   ` Jarod Wilson
2010-12-04 21:05 ` [PATCH v2] media: rc: ir-lirc-codec: fix " Vasiliy Kulikov
2010-12-08 16:15   ` Jarod Wilson

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