Commit 22a0546
HID: pidff: Fix null pointer dereference in pidff_find_fields
This function triggered a null pointer dereference if used to search for
a report that isn't implemented on the device. This happened both for
optional and required reports alike.
The same logic was applied to pidff_find_special_field and although
pidff_init_fields should return an error earlier if one of the required
reports is missing, future modifications could change this logic and
resurface this possible null pointer dereference again.
LKML bug report:
https://lore.kernel.org/all/CAL-gK7f5=R0nrrQdPtaZZr1fd-cdAMbDMuZ_NLA8vM0SX+nGSw@mail.gmail.com
Reported-by: Nolan Nicholson <[email protected]>
Signed-off-by: Tomasz Pakuła <[email protected]>
Reviewed-by: Michał Kopeć <[email protected]>
Reviewed-by: Paul Dino Jones <[email protected]>
Tested-by: Paul Dino Jones <[email protected]>
Tested-by: Cristóferson Bueno <[email protected]>
Tested-by: Pablo Cisneros <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>1 parent f7ebf0b commit 22a0546
1 file changed
+10
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
926 | 926 | | |
927 | 927 | | |
928 | 928 | | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
929 | 934 | | |
930 | 935 | | |
931 | 936 | | |
| |||
1050 | 1055 | | |
1051 | 1056 | | |
1052 | 1057 | | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
1053 | 1063 | | |
1054 | 1064 | | |
1055 | 1065 | | |
| |||
0 commit comments