From: bugzilla-daemon@bugzilla.kernel.org
To: linuxppc-dev@lists.ozlabs.org
Subject: [Bug 205885] [Bisected] BUG: KASAN: null-ptr-deref in strncpy+0x3c/0x60
Date: Tue, 17 Dec 2019 17:52:27 +0000 [thread overview]
Message-ID: <bug-205885-206035-28LCs40cQY@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-205885-206035@https.bugzilla.kernel.org/>
https://bugzilla.kernel.org/show_bug.cgi?id=205885
Erhard F. (erhard_f@mailbox.org) changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #286345|0 |1
is obsolete| |
--- Comment #6 from Erhard F. (erhard_f@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@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@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.
next prev parent reply other threads:[~2019-12-17 17:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-17 0:33 [Bug 205885] New: BUG: KASAN: null-ptr-deref in strncpy+0x3c/0x60 bugzilla-daemon
2019-12-17 0:35 ` [Bug 205885] " bugzilla-daemon
2019-12-17 5:41 ` bugzilla-daemon
2019-12-17 15:22 ` bugzilla-daemon
2019-12-17 17:49 ` bugzilla-daemon
2019-12-17 17:51 ` [Bug 205885] [Bisected] " bugzilla-daemon
2019-12-17 17:52 ` bugzilla-daemon [this message]
2019-12-18 11:07 ` bugzilla-daemon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-205885-206035-28LCs40cQY@https.bugzilla.kernel.org/ \
--to=bugzilla-daemon@bugzilla.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).