kernel-fxtec-pro1x/drivers/staging/tty
Vasiliy Kulikov 5d46f32667 staging: istallion: fix arbitrary kernel memory reads/writes
stli_brdstats is defined as global variable.  After de-BKL-ization in
the patch b4eda9cb48 an access to the variable is not serialized
anymore.  This leads to the race window between the check and the use
in stli_getbrdstats():

        if (copy_from_user(&stli_brdstats, bp, sizeof(combrd_t)))
                return -EFAULT;
        if (stli_brdstats.brd >= STL_MAXBRDS) <<<
                return -ENODEV;
        brdp = stli_brds[stli_brdstats.brd];  <<<

If one process calls COM_GETBRDSTATS ioctl() with sane .brd, second
process calls COM_GETBRDSTATS ioctl() with invalid .brd, and the
second process' copy_from_user() executes exactly between the check and
stli_brds[] indexation of the first process, then the first process gets
contents of memory at *stli_brds[stli_brdstats.brd] address.  Also
the resulting .nrpanels field may be too big, in this case
stli_brdstats.panels array overflows.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-25 16:45:22 -07:00
..
ip2 Fix common misspellings 2011-03-31 11:26:23 -03:00
cd1865.h Fix common misspellings 2011-03-31 11:26:23 -03:00
digi1.h
digiFep1.h
digiPCI.h
epca.c Fix common misspellings 2011-03-31 11:26:23 -03:00
epca.h
epcaconfig.h
istallion.c staging: istallion: fix arbitrary kernel memory reads/writes 2011-04-25 16:45:22 -07:00
Kconfig
Makefile
riscom8.c
riscom8.h
riscom8_reg.h
serial167.c
specialix.c Fix common misspellings 2011-03-31 11:26:23 -03:00
specialix_io8.h Fix common misspellings 2011-03-31 11:26:23 -03:00
stallion.c
TODO