linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: Entropy Moe <3ntr0py1337@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	akpm@linux-foundation.org, Dmitry Vyukov <dvyukov@google.com>
Subject: Re: KASAN: stack-out-of-bounds Write in mpol_to_str
Date: Wed, 25 Mar 2020 17:54:48 -0700	[thread overview]
Message-ID: <110bb9ab-9765-1c5b-39c6-3644cb1b99a4@infradead.org> (raw)
In-Reply-To: <CALzBtj+8AYASaYW2fqgmgthCgeAJ2N0Q+ey2wqgEKjBtH34Vcg@mail.gmail.com>

On 3/20/20 1:36 AM, Entropy Moe wrote:
> Hello Randy,
> please see attached POC for the vulnerability.
> 

Hi Moe,

Do you have anything to do with the syzkaller source code generation? (POC; reproducers)

I don't expect it to be beautiful, but it could be a lot easier to read in a few places.

E.g., the POC that you provided sets a tmpfs mount option string to
"mpol=prefer:,", which is probably purposely malformed (OK), but it does
so in an unreadable manner: (I added the // comments.)

memcpy((void*)0x20000340, "mpol", 4);
*(uint8_t*)0x20000344 = 0x3d; // =
memcpy((void*)0x20000345, "prefer", 6);
*(uint8_t*)0x2000034b = 0x3a; // :
*(uint8_t*)0x2000034c = 0x2c; // ,
*(uint8_t*)0x2000034d = 0;


That kind of obfuscation just helps slow down debugging. :(

-- 
~Randy



  parent reply	other threads:[~2020-03-26  0:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-15 19:57 KASAN: stack-out-of-bounds Write in mpol_to_str Entropy Moe
2020-03-16 18:46 ` Randy Dunlap
2020-03-20  8:36   ` Entropy Moe
2020-03-21  6:45     ` Andrew Morton
2020-03-26  0:54     ` Randy Dunlap [this message]
2020-03-26  0:45 ` [PATCH] mm: mempolicy: require at least one nodeid for MPOL_PREFERRED Randy Dunlap
2020-03-26  2:23 KASAN: stack-out-of-bounds Write in mpol_to_str syzbot
2020-03-26  3:47 ` Randy Dunlap

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=110bb9ab-9765-1c5b-39c6-3644cb1b99a4@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=3ntr0py1337@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=dvyukov@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.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).