mirror of
https://github.com/torvalds/linux.git
synced 2024-12-25 12:21:37 +00:00
1e7439388a
This patch fixes stack corruption bug present in af9015_eeprom_dump():
the buffer buf is one byte smaller than required - there is 4 chars
for address prefix, 16*3 chars for dump of 16 eeprom bytes per line
and 1 byte for zero ending the string required, i.e. 53 bytes, but
only 52 are provided.
The one byte missing in stack based buffer buf causes following oops
on MIPS little endian platform, because i2c_adap pointer in
af9015_af9013_frontend_attach() is corrupted by inlined function
af9015_eeprom_dump():
CPU 0 Unable to handle kernel paging request at virtual address 00000000, epc ==
803a4488, ra == c049a1c8
Oops[#1]:
Cpu 0
$ 0 : 00000000 10003c00 00000000 803a4468
$ 4 : 8f17c600 8f067b30 00000002 00000038
$ 8 : 00000001 8faf3e98 11da000d 09010002
$12 : 00000000 00000000 00000000 0000000a
$16 : 8f17c600 8f067b68 8faf3c00 8f067c04
$20 : 8f067b9c 00000100 8f067bf0 80104100
$24 : 00000000 2aba9fb0
$28 : 8f066000 8f067af0 802cbc48 c049a1c8
Hi : 00000000
Lo : 00000000
epc : 803a4488 i2c_transfer+0x20/0x104
Not tainted
ra : c049a1c8 af9013_read_reg+0x78/0xc4 [af9013]
Status: 10003c03 KERNEL EXL IE
Cause : 00808008
BadVA : 00000000
PrId : 03030200 (Au1550)
Modules linked in: af9013 dvb_usb_af9015(+) dvb_usb dvb_core firmware_class
i2c_au1550 au1550_spi
Process modprobe (pid: 2757, threadinfo=8f066000, task=8fade098, tls=2aad6470)
Stack : c049f5e0 80163090 805ba880 00000100 8f067bf0 0000d733 8f067b68 8faf3c00
8f067c04 c049a1c8 80163bc0 8056a630 8f067b40 80163224
|
||
---|---|---|
.. | ||
common | ||
dvb | ||
radio | ||
video | ||
Kconfig | ||
Makefile |