Commit 5610bcf
fbdev: smscufx: Fix use-after-free in ufx_ops_open()
A race condition may occur if the user physically removes the
USB device while calling open() for this device node.
This is a race condition between the ufx_ops_open() function and
the ufx_usb_disconnect() function, which may eventually result in UAF.
So, add a mutex to the ufx_ops_open() and ufx_usb_disconnect() functions
to avoid race contidion of krefs.
Signed-off-by: Hyunwoo Kim <imv4bel@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Helge Deller <deller@gmx.de>1 parent e69dade commit 5610bcf
1 file changed
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| 140 | + | |
| 141 | + | |
140 | 142 | | |
141 | 143 | | |
142 | 144 | | |
| |||
1071 | 1073 | | |
1072 | 1074 | | |
1073 | 1075 | | |
| 1076 | + | |
| 1077 | + | |
1074 | 1078 | | |
1075 | | - | |
| 1079 | + | |
| 1080 | + | |
1076 | 1081 | | |
| 1082 | + | |
1077 | 1083 | | |
1078 | 1084 | | |
1079 | 1085 | | |
| |||
1097 | 1103 | | |
1098 | 1104 | | |
1099 | 1105 | | |
| 1106 | + | |
| 1107 | + | |
1100 | 1108 | | |
1101 | 1109 | | |
1102 | 1110 | | |
| |||
1741 | 1749 | | |
1742 | 1750 | | |
1743 | 1751 | | |
| 1752 | + | |
| 1753 | + | |
1744 | 1754 | | |
1745 | 1755 | | |
1746 | 1756 | | |
| |||
1761 | 1771 | | |
1762 | 1772 | | |
1763 | 1773 | | |
| 1774 | + | |
| 1775 | + | |
1764 | 1776 | | |
1765 | 1777 | | |
1766 | 1778 | | |
| |||
0 commit comments