lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 14 May 2020 12:27:42 +0200
From:   Daniel Borkmann <daniel@...earbox.net>
To:     Masami Hiramatsu <mhiramat@...nel.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>
Cc:     Christoph Hellwig <hch@....de>,
        the arch/x86 maintainers <x86@...nel.org>,
        Alexei Starovoitov <ast@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        linux-parisc@...r.kernel.org,
        linux-um <linux-um@...ts.infradead.org>,
        Netdev <netdev@...r.kernel.org>, bpf@...r.kernel.org,
        Linux-MM <linux-mm@...ck.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 11/18] maccess: remove strncpy_from_unsafe

On 5/14/20 11:44 AM, Masami Hiramatsu wrote:
> On Wed, 13 May 2020 19:43:24 -0700
> Linus Torvalds <torvalds@...ux-foundation.org> wrote:
>> On Wed, May 13, 2020 at 6:00 PM Masami Hiramatsu <mhiramat@...nel.org> wrote:
>>>
>>>> But we should likely at least disallow it entirely on platforms where
>>>> we really can't - or pick one hardcoded choice. On sparc, you really
>>>> _have_ to specify one or the other.
>>>
>>> OK. BTW, is there any way to detect the kernel/user space overlap on
>>> memory layout statically? If there, I can do it. (I don't like
>>> "if (CONFIG_X86)" thing....)
>>> Or, maybe we need CONFIG_ARCH_OVERLAP_ADDRESS_SPACE?
>>
>> I think it would be better to have a CONFIG variable that
>> architectures can just 'select' to show that they are ok with separate
>> kernel and user addresses.
>>
>> Because I don't think we have any way to say that right now as-is. You
>> can probably come up with hacky ways to approximate it, ie something
>> like
>>
>>      if (TASK_SIZE_MAX > PAGE_OFFSET)
>>          .... they overlap ..
>>
>> which would almost work, but..
> 
> It seems TASK_SIZE_MAX is defined only on x86 and s390, what about
> comparing STACK_TOP_MAX with PAGE_OFFSET ?
> Anyway, I agree that the best way is introducing a CONFIG.

Agree, CONFIG knob that archs can select feels cleanest. Fwiw, I've cooked
up fixes for bpf side locally here and finishing up testing, will push out
later today.

Thanks,
Daniel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ