]> git.baikalelectronics.ru Git - kernel.git/commit
staging: unisys: visorchannel_write() fix potential memory corruption
authorJes Sorensen <Jes.Sorensen@redhat.com>
Tue, 16 Jun 2015 13:13:33 +0000 (09:13 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 16 Jun 2015 21:36:39 +0000 (14:36 -0700)
commit44520f860af4365573d5645d33a4ae7b27bf908c
treefbee1de66a2ee35d637cb7b27718c608e5c97caf
parent74fd4e266a33cea146a0281002f73c7aae279cb6
staging: unisys: visorchannel_write() fix potential memory corruption

This fixes the memory corruption case, if nbytes is less than offset
and sizeof(struct channel_header)

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/unisys/visorbus/visorchannel.c