lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 20 Mar 2014 17:04:21 -0700
From:	Greg Kroah-Hartman <>
Cc:	Greg Kroah-Hartman <>,, Artem Fetishev <>,
	Aleksandr Terekhov <>,, Pavel Emelyanov <>,
	Cyrill Gorcunov <>,
	"Eric W. Biederman" <>,
	Andrew Morton <>,
	Linus Torvalds <>
Subject: [PATCH 3.13 098/149] fs/proc/base.c: fix GPF in /proc/$PID/map_files

3.13-stable review patch.  If anyone has any objections, please let me know.


From: Artem Fetishev <>

commit 70335abb2689c8cd5df91bf2d95a65649addf50b upstream.

The expected logic of proc_map_files_get_link() is either to return 0
and initialize 'path' or return an error and leave 'path' uninitialized.

By the time dname_to_vma_addr() returns 0 the corresponding vma may have
already be gone.  In this case the path is not initialized but the
return value is still 0.  This results in 'general protection fault'
inside d_path().

Steps to reproduce:


    fd = open(...);
    while (1) {
        mmap(fd, ...);
        munmap(fd, ...);

  ls -la /proc/$PID/map_files


Signed-off-by: Artem Fetishev <>
Signed-off-by: Aleksandr Terekhov <>
Reported-by: <>
Acked-by: Pavel Emelyanov <>
Acked-by: Cyrill Gorcunov <>
Reviewed-by: "Eric W. Biederman" <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
Signed-off-by: Greg Kroah-Hartman <>

 fs/proc/base.c |    1 +
 1 file changed, 1 insertion(+)

--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -1819,6 +1819,7 @@ static int proc_map_files_get_link(struc
 	if (rc)
 		goto out_mmput;
+	rc = -ENOENT;
 	vma = find_exact_vma(mm, vm_start, vm_end);
 	if (vma && vma->vm_file) {

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists