mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-29 05:18:00 +00:00
29 lines
809 B
Diff
29 lines
809 B
Diff
From: Vasiliy Kulikov <segooon@gmail.com>
|
|
|
|
In the patch "proc: fix races against execve() of /proc/PID/fd**"
|
|
proc_pid_fd_link_getattr() leaked task_struct if ptrace check fails.
|
|
|
|
Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
|
|
Reported-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
|
---
|
|
|
|
fs/proc/base.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff -puN fs/proc/base.c~proc-fix-races-against-execve-of-proc-pid-fd-fix fs/proc/base.c
|
|
--- a/fs/proc/base.c~proc-fix-races-against-execve-of-proc-pid-fd-fix
|
|
+++ a/fs/proc/base.c
|
|
@@ -1681,9 +1681,9 @@ static int proc_pid_fd_link_getattr(stru
|
|
|
|
generic_fillattr(inode, stat);
|
|
unlock_trace(task);
|
|
- put_task_struct(task);
|
|
rc = 0;
|
|
out_task:
|
|
+ put_task_struct(task);
|
|
return rc;
|
|
}
|
|
|
|
_
|