https://github.com/torvalds/linux
Revision e15465e1808542743627f13d1c0cbb7eacc82b83 authored by Dan Carpenter on 16 April 2013, 21:10:38 UTC, committed by David S. Miller on 19 April 2013, 21:32:31 UTC
The "reason" can come from skb->data[] and it hasn't been capped so it
can be from 0-255 instead of just 0-6.  For example in irlmp_state_dtr()
the code does:

	reason = skb->data[3];
	...
	irlmp_disconnect_indication(self, reason, skb);

Also LMREASON has a couple other values which don't have entries in the
irlmp_reasons[] array.  And 0xff is a valid reason as well which means
"unknown".

So far as I can see we don't actually care about "reason" except for in
the debug code.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent fd7fc25
History
Tip revision: e15465e1808542743627f13d1c0cbb7eacc82b83 authored by Dan Carpenter on 16 April 2013, 21:10:38 UTC
irda: small read past the end of array in debug code
Tip revision: e15465e
File Mode Size
Documentation
arch
block
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.gitignore -rw-r--r-- 1.1 KB
.mailmap -rw-r--r-- 4.4 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 93.0 KB
Kbuild -rw-r--r-- 2.5 KB
Kconfig -rw-r--r-- 252 bytes
MAINTAINERS -rw-r--r-- 244.0 KB
Makefile -rw-r--r-- 47.0 KB
README -rw-r--r-- 18.3 KB
REPORTING-BUGS -rw-r--r-- 3.3 KB

README

back to top