mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] uinput strnlen bugfix
@ 2011-02-06 16:49 David Herrmann
  2011-02-06 16:55 ` Aristeu Rozanski
  0 siblings, 1 reply; 9+ messages in thread
From: David Herrmann @ 2011-02-06 16:49 UTC (permalink / raw)
  To: linux-kernel; +Cc: aris

The uinput device driver (drivers/input/misc/uinput.c) incorrectly
computes the size of new device names. This patch fixes this. The diff
is against 2.6.37 but the bug also exists in the most recent git
sources.

strnlen() never returns negative numbers so the result should be
incremented after checking for zero. Otherwise the test will always be
false. This bug allows empty input device names.

Please CC me, I'm not subscribed to the mailing list.

David

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

end of thread, other threads:[~2011-02-08 19:59 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-06 16:49 [PATCH] uinput strnlen bugfix David Herrmann
2011-02-06 16:55 ` Aristeu Rozanski
2011-02-06 16:57   ` David Herrmann
2011-02-06 17:23     ` Aristeu Rozanski
2011-02-07  7:40       ` Dmitry Torokhov
2011-02-07 12:52         ` David Herrmann
2011-02-07 13:25         ` Aristeu Rozanski
2011-02-08  7:38         ` Dmitry Torokhov
2011-02-08 19:58           ` Aristeu Rozanski

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®