Commit 9d65d0e
Input: ims-psu - check if CDC union descriptor is sane
commit ea04efe upstream.
Before trying to use CDC union descriptor, try to validate whether that it
is sane by checking that intf->altsetting->extra is big enough and that
descriptor bLength is not too big and not too small.
Reported-by: Andrey Konovalov <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Cc: Ben Hutchings <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent 8cf061d commit 9d65d0e
1 file changed
+14
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1635 | 1635 | | |
1636 | 1636 | | |
1637 | 1637 | | |
1638 | | - | |
| 1638 | + | |
1639 | 1639 | | |
1640 | 1640 | | |
| 1641 | + | |
| 1642 | + | |
| 1643 | + | |
| 1644 | + | |
| 1645 | + | |
1641 | 1646 | | |
1642 | 1647 | | |
1643 | 1648 | | |
1644 | | - | |
| 1649 | + | |
| 1650 | + | |
| 1651 | + | |
| 1652 | + | |
| 1653 | + | |
| 1654 | + | |
| 1655 | + | |
| 1656 | + | |
1645 | 1657 | | |
1646 | 1658 | | |
1647 | 1659 | | |
| |||
0 commit comments