Commit b39a183
ksmbd: fix use-after-free in ksmbd_tree_connect_put under concurrency
Under high concurrency, A tree-connection object (tcon) is freed on
a disconnect path while another path still holds a reference and later
executes *_put()/write on it.
Reported-by: Qianchang Zhao <pioooooooooip@gmail.com>
Reported-by: Zhitong Liu <liuzhitong1993@gmail.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>1 parent 3316a8f commit b39a183
3 files changed
Lines changed: 4 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
82 | 81 | | |
83 | 82 | | |
84 | 83 | | |
| |||
100 | 99 | | |
101 | 100 | | |
102 | 101 | | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
| 102 | + | |
| 103 | + | |
111 | 104 | | |
112 | 105 | | |
113 | 106 | | |
| |||
119 | 112 | | |
120 | 113 | | |
121 | 114 | | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | 115 | | |
127 | 116 | | |
128 | 117 | | |
129 | | - | |
| 118 | + | |
| 119 | + | |
130 | 120 | | |
131 | 121 | | |
132 | 122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | 36 | | |
38 | 37 | | |
39 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2190 | 2190 | | |
2191 | 2191 | | |
2192 | 2192 | | |
2193 | | - | |
2194 | 2193 | | |
2195 | 2194 | | |
2196 | 2195 | | |
| |||
2200 | 2199 | | |
2201 | 2200 | | |
2202 | 2201 | | |
2203 | | - | |
2204 | | - | |
2205 | 2202 | | |
2206 | 2203 | | |
2207 | 2204 | | |
| |||
0 commit comments