]> git.ipfire.org Git - thirdparty/qemu.git/commit
tsc210x: fix buffer overrun on invalid state load
authorMichael S. Tsirkin <mst@redhat.com>
Thu, 3 Apr 2014 16:52:09 +0000 (19:52 +0300)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Thu, 26 Jun 2014 19:21:02 +0000 (14:21 -0500)
commitc75e43b871fb0a777ae1101a26a42ea213f7aff6
tree6366164210d0ac57d73ca54ed41a1604ce59b218
parentaf443645c3383f26a309d200413649ecac9ac58f
tsc210x: fix buffer overrun on invalid state load

CVE-2013-4539

s->precision, nextprecision, function and nextfunction
come from wire and are used
as idx into resolution[] in TSC_CUT_RESOLUTION.

Validate after load to avoid buffer overrun.

Cc: Andreas Färber <afaerber@suse.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
(cherry picked from commit 5193be3be35f29a35bc465036cd64ad60d43385f)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/input/tsc210x.c