linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Kefeng Wang <wangkefeng.wang@huawei.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: <paul@paul-moore.com>, <stephen.smalley.work@gmail.com>,
	<selinux@vger.kernel.org>, <linux-mm@kvack.org>,
	<david@redhat.com>, <peterz@infradead.org>,
	Ondrej Mosnacek <omosnace@redhat.com>
Subject: Re: [PATCH] mm: fix VMA heap bounds checking
Date: Fri, 8 Dec 2023 09:20:25 +0800	[thread overview]
Message-ID: <fd1c5f6f-583b-4d49-8f18-ea0c8a38305d@huawei.com> (raw)
In-Reply-To: <20231207141613.1d7d59d8c151729e25be53fa@linux-foundation.org>



On 2023/12/8 6:16, Andrew Morton wrote:
> On Thu, 7 Dec 2023 23:25:25 +0800 Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
> 
>> After selinux converting to VMA heap check helper, the gcl triggers
>> an execheap SELinux denial, which caused by different check logical.
>>
>> The old from selinux only check VMA range within VMA heap range, and
>> the new will check the intersects between the two ranges, but the corner
>> cases(vm_end=start_brk, brk=vm_start) doesn't be handled correctly.
>>
>> Since commit 11250fd12eb8 ("mm: factor out VMA stack and heap checks")
>> only a function extraction, it seems that the issue introduced from
>> commit 0db0c01b53a1 ("procfs: fix /proc/<pid>/maps heap check"), let's
>> fix above corner cases, meanwhile, corrent the wrong indentation of the
>> stack and heap check helpers.
>>
>> Reported-and-tested-by: Ondrej Mosnacek <omosnace@redhat.com>
>> Closes: https://lore.kernel.org/selinux/CAFqZXNv0SVT0fkOK6neP9AXbj3nxJ61JAY4+zJzvxqJaeuhbFw@mail.gmail.com/
>> Fixes: 0db0c01b53a1 ("procfs: fix /proc/<pid>/maps heap check")
> 
> I suggest this should be Fixes: 11250fd12eb8 ("mm: factor out VMA stack and
> heap checks").  Sure, 0db0c01b53a1 may have been wrong, but is there
> any point in suggesting to people that they backport this fix over 12 years
> worth of kernels?  Or is it the case that only kernels which contain
> 11250fd12eb8 need this change?

Fair enough, also thanks for updating the commit message.
> 


      reply	other threads:[~2023-12-08  1:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-07 15:25 Kefeng Wang
2023-12-07 22:16 ` Andrew Morton
2023-12-08  1:20   ` Kefeng Wang [this message]

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=fd1c5f6f-583b-4d49-8f18-ea0c8a38305d@huawei.com \
    --to=wangkefeng.wang@huawei.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@redhat.com \
    --cc=linux-mm@kvack.org \
    --cc=omosnace@redhat.com \
    --cc=paul@paul-moore.com \
    --cc=peterz@infradead.org \
    --cc=selinux@vger.kernel.org \
    --cc=stephen.smalley.work@gmail.com \
    /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