mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
Input: cyttsp5 - clamp the HID report size before memcpy
The size field comes from the device and is used as the memcpy()
length into response_buf, which is CY_MAX_INPUT bytes.
Fixes: 5b0c03e24a ("Input: Add driver for Cypress Generation 5 touchscreen")
Signed-off-by: Linkai Gong <gonglinkai@kylinos.cn>
Link: https://patch.msgid.link/20260901122649.1173066-1-gonglinkai@kylinos.cn
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
parent
f84819ef8d
commit
85f080fb87
|
|
@ -710,6 +710,7 @@ static irqreturn_t cyttsp5_handle_irq(int irq, void *handle)
|
|||
size = 2;
|
||||
} else {
|
||||
report_id = ts->input_buf[2];
|
||||
size = min(size, CY_MAX_INPUT);
|
||||
}
|
||||
|
||||
switch (report_id) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user