In the Linux kernel, the following vulnerability has been resolved:
wifi: rtw88: fix the 'para' buffer size to avoid reading out of bounds
Set the size to 6 instead of 2, since 'para' array is passed to 'rtwfwbtwificontrol(rtwdev, para[0], ¶[1])', which reads 5 bytes:
void rtwfwbtwificontrol(struct rtwdev *rtwdev, u8 opcode, u8 *data) { ... SETBTWIFICONTROLDATA1(h2cpkt, *data); SETBTWIFICONTROLDATA2(h2cpkt, *(data + 1)); ... SETBTWIFICONTROLDATA5(h2c_pkt, *(data + 4));
Detected using the static analysis tool - Svace.