Commit 6572786
committed
fprobe: Fix to allocate entry_data_size buffer with rethook instances
Fix to allocate fprobe::entry_data_size buffer with rethook instances.
If fprobe doesn't allocate entry_data_size buffer for each rethook instance,
fprobe entry handler can cause a buffer overrun when storing entry data in
entry handler.
Link: https://lore.kernel.org/all/170920576727.107552.638161246679734051.stgit@devnote2/
Reported-by: Jiri Olsa <olsajiri@gmail.com>
Closes: https://lore.kernel.org/all/Zd9eBn2FTQzYyg7L@krava/
Fixes: 4bbd934 ("kprobes: kretprobe scalability improvement")
Cc: stable@vger.kernel.org
Tested-by: Jiri Olsa <olsajiri@gmail.com>
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>1 parent b401b62 commit 6572786
1 file changed
Lines changed: 6 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | 192 | | |
196 | 193 | | |
197 | 194 | | |
198 | 195 | | |
199 | 196 | | |
200 | 197 | | |
201 | 198 | | |
202 | | - | |
| 199 | + | |
203 | 200 | | |
204 | | - | |
205 | | - | |
| 201 | + | |
| 202 | + | |
206 | 203 | | |
207 | 204 | | |
| 205 | + | |
| 206 | + | |
208 | 207 | | |
209 | | - | |
210 | | - | |
| 208 | + | |
211 | 209 | | |
212 | 210 | | |
213 | 211 | | |
| |||
0 commit comments