summaryrefslogtreecommitdiff
path: root/net/ipv6
diff options
context:
space:
mode:
authorTodd Kjos <tkjos@google.com>2017-11-10 15:30:27 -0800
committerTodd Kjos <tkjos@google.com>2017-11-15 12:18:22 -0800
commit19ef30ef23a4de3f0bd8979a5bb5216dd381bc75 (patch)
tree566dfed8416fa25f55be10b5abc9213c6acf7fd8 /net/ipv6
parent03d4af8271682742aa21bbbf3032a839764f591a (diff)
FROMLIST: binder: fix proc->files use-after-free
(from https://patchwork.kernel.org/patch/10058587/) proc->files cleanup is initiated by binder_vma_close. Therefore a reference on the binder_proc is not enough to prevent the files_struct from being released while the binder_proc still has a reference. This can lead to an attempt to dereference the stale pointer obtained from proc->files prior to proc->files cleanup. This has been seen once in task_get_unused_fd_flags() when __alloc_fd() is called with a stale "files". The fix is to always use get_files_struct() to obtain struct_files so that the refcount on the files_struct is used to prevent a premature free. proc->files is removed since we get it every time. Bug: 69164715 Change-Id: I6431027d3d569e76913935c21885201505627982 Signed-off-by: Todd Kjos <tkjos@google.com>
Diffstat (limited to 'net/ipv6')
0 files changed, 0 insertions, 0 deletions