On Thu, 7 Dec 2023 23:25:25 +0800 Kefeng Wang <wangkefeng.wang@xxxxxxxxxx> 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@xxxxxxxxxx> > Closes: https://lore.kernel.org/selinux/CAFqZXNv0SVT0fkOK6neP9AXbj3nxJ61JAY4+zJzvxqJaeuhbFw@xxxxxxxxxxxxxx/ > 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?