Commit c2d443a
crypto: qat - Fix ADF_DEV_RESET_SYNC memory leak
commit d3b17c6 upstream.
Using completion_done to determine whether the caller has gone
away only works after a complete call. Furthermore it's still
possible that the caller has not yet called wait_for_completion,
resulting in another potential UAF.
Fix this by making the caller use cancel_work_sync and then freeing
the memory safely.
Fixes: 7d42e09 ("crypto: qat - resolve race condition during AER recovery")
Cc: <stable@vger.kernel.org> #6.8+
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent d141043 commit c2d443a
1 file changed
+5
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
96 | | - | |
| 95 | + | |
97 | 96 | | |
98 | 97 | | |
99 | 98 | | |
100 | 99 | | |
101 | 100 | | |
102 | 101 | | |
103 | 102 | | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
| 103 | + | |
| 104 | + | |
114 | 105 | | |
115 | 106 | | |
116 | 107 | | |
| |||
145 | 136 | | |
146 | 137 | | |
147 | 138 | | |
| 139 | + | |
148 | 140 | | |
149 | | - | |
150 | | - | |
151 | 141 | | |
| 142 | + | |
152 | 143 | | |
153 | 144 | | |
154 | 145 | | |
| |||
0 commit comments