summaryrefslogtreecommitdiff
path: root/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
diff options
context:
space:
mode:
authorJack Bendtsen <jackdbendtsen@gmail.com>2025-06-19 17:40:31 +1000
committerWarner Losh <imp@FreeBSD.org>2026-01-09 13:17:13 -0700
commit7631790422464de1aec309018e2c444defe5f629 (patch)
tree9c24c3ea193699d1a3ac5b65e22778419522e735 /source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
parent3e72ce4081f4a8d6b1d879dae201d569ce450261 (diff)
Fix NULL deref segfault in bhyve's usb_mouse.c
Some of the cases inside umouse_request() (usr.sbin/bhyve/usb_mouse.c) use the data component of an event, while only partially checking if it's NULL. 'data' has a NULL check, but then 'data' is immediately deferenced anyway after the check regardless of if it's NULL or not. For example: case UREQ(UR_GET_STATUS, UT_READ_INTERFACE): case UREQ(UR_GET_STATUS, UT_READ_ENDPOINT): DPRINTF(("umouse: (UR_GET_STATUS, UT_READ_INTERFACE)")); if (data != NULL && len > 1) { USETW(udata, 0); data->blen = len - 2; data->bdone += 2; } eshort = data->blen > 0; break; There are actually four occurrences of this same bug, each in a different case in this switch block. Signed-off-by: Jack Bendtsen <jackdbendtsen@gmail.com> PR: 282237 Reviewed by: imp, jhb, vexeduxr MFC After: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/1728
Diffstat (limited to 'source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp')
0 files changed, 0 insertions, 0 deletions