[Bug 205885] [Bisected] BUG: KASAN: null-ptr-deref in strncpy+0x3c/0x60

bugzilla-daemon at bugzilla.kernel.org bugzilla-daemon at bugzilla.kernel.org
Wed Dec 18 04:52:27 AEDT 2019


https://bugzilla.kernel.org/show_bug.cgi?id=205885

Erhard F. (erhard_f at mailbox.org) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #286345|0                           |1
        is obsolete|                            |

--- Comment #6 from Erhard F. (erhard_f at mailbox.org) ---
Created attachment 286347
  --> https://bugzilla.kernel.org/attachment.cgi?id=286347&action=edit
bisect.log

# git bisect bad | tee -a ~/bisect01.log 
cccaa5e33525fc07f4a2ce0518e50b9ddf435e47 is the first bad commit
commit cccaa5e33525fc07f4a2ce0518e50b9ddf435e47
Author: Dominik Brodowski <linux at dominikbrodowski.net>
Date:   Tue Oct 23 22:41:09 2018 +0200

    init: use do_mount() instead of ksys_mount()

    In prepare_namespace(), do_mount() can be used instead of ksys_mount()
    as the first and third argument are const strings in the kernel, the
    second and fourth argument are passed through anyway, and the fifth
    argument is NULL.

    In do_mount_root(), ksys_mount() is called with the first and third
    argument being already kernelspace strings, which do not need to be
    copied over from userspace to kernelspace (again). The second and
    fourth arguments are passed through to do_mount() anyway. The fifth
    argument, while already residing in kernelspace, needs to be put into
    a page of its own. Then, do_mount() can be used instead of
    ksys_mount().

    Once this is done, there are no in-kernel users to ksys_mount() left,
    which can therefore be removed.

    Signed-off-by: Dominik Brodowski <linux at dominikbrodowski.net>

 fs/namespace.c           | 10 ++--------
 include/linux/syscalls.h |  2 --
 init/do_mounts.c         | 28 ++++++++++++++++++++++------
 3 files changed, 24 insertions(+), 16 deletions(-)

-- 
You are receiving this mail because:
You are watching the assignee of the bug.


More information about the Linuxppc-dev mailing list