asymingt / rts5139

Fix for RTS5129 USB MMC card reader on Linux 3.16+ kernels
62 stars 18 forks source link

possible security issue #3

Closed 1a8e closed 7 years ago

1a8e commented 7 years ago

the second parameter to memcpy could be smaller than the size specified fixed it

While compiling against the 4.12.0-1-hardened kernel, the compiler reports

In function ‘memcpy’,
    inlined from ‘inquiry’ at /tmp/yaourt-tmp-cyan/aur-rts5139-git/src/rts5139/rts51x_scsi.c:498:3,
    inlined from ‘rts51x_scsi_handler’ at /tmp/yaourt-tmp-cyan/aur-rts5139-git/src/rts5139/rts51x_scsi.c:1847:10:
./include/linux/string.h:315:4: error: call to ‘__read_overflow2’ declared with attribute error: detected read beyond size of object passed as 2nd parameter
    __read_overflow2();
    ^~~~~~~~~~~~~~~~~~