Commit 2274767
most: usb: fix double free on late probe failure
commit baadf2a upstream.
The MOST subsystem has a non-standard registration function which frees
the interface on registration failures and on deregistration.
This unsurprisingly leads to bugs in the MOST drivers, and a couple of
recent changes turned a reference underflow and use-after-free in the
USB driver into several double free and a use-after-free on late probe
failures.
Fixes: 723de0f ("staging: most: remove device from interface structure")
Fixes: 4b12709 ("most: usb: Fix use-after-free in hdm_disconnect")
Fixes: a8cc9e5 ("most: usb: hdm_probe: Fix calling put_device() before device initialization")
Cc: stable@vger.kernel.org
Cc: Christian Gromm <christian.gromm@microchip.com>
Cc: Victoria Votokina <Victoria.Votokina@kaspersky.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20251029093029.28922-1-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 8fef76f commit 2274767
1 file changed
+5
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1058 | 1058 | | |
1059 | 1059 | | |
1060 | 1060 | | |
1061 | | - | |
| 1061 | + | |
1062 | 1062 | | |
1063 | 1063 | | |
1064 | 1064 | | |
| |||
1068 | 1068 | | |
1069 | 1069 | | |
1070 | 1070 | | |
1071 | | - | |
1072 | | - | |
| 1071 | + | |
1073 | 1072 | | |
1074 | 1073 | | |
1075 | 1074 | | |
| |||
1078 | 1077 | | |
1079 | 1078 | | |
1080 | 1079 | | |
| 1080 | + | |
1081 | 1081 | | |
1082 | | - | |
1083 | | - | |
| 1082 | + | |
1084 | 1083 | | |
1085 | 1084 | | |
1086 | 1085 | | |
1087 | 1086 | | |
1088 | 1087 | | |
1089 | | - | |
1090 | | - | |
1091 | | - | |
1092 | | - | |
| 1088 | + | |
1093 | 1089 | | |
1094 | 1090 | | |
1095 | 1091 | | |
| |||
0 commit comments