Commit d24ffec
tuntap: fix use after free during release
After commit 2ee5c10 ("tun: fix use after free for ptr_ring") we
need clean up tx ring during release(). But unfortunately, it tries to
do the cleanup blindly after socket were destroyed which will lead
another use-after-free. Fix this by doing the cleanup before dropping
the last reference of the socket in __tun_detach().
Reported-by: Andrei Vagin <[email protected]>
Acked-by: Andrei Vagin <[email protected]>
Fixes: 2ee5c10 ("tun: fix use after free for ptr_ring")
Signed-off-by: Jason Wang <[email protected]>
Signed-off-by: David S. Miller <[email protected]>1 parent 390e8d1 commit d24ffec
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
729 | 729 | | |
730 | 730 | | |
731 | 731 | | |
| 732 | + | |
732 | 733 | | |
733 | 734 | | |
734 | 735 | | |
| |||
3245 | 3246 | | |
3246 | 3247 | | |
3247 | 3248 | | |
3248 | | - | |
3249 | 3249 | | |
3250 | 3250 | | |
3251 | 3251 | | |
| |||
0 commit comments