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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <271dcdcd-d622-552c-338a-5eeca5e2b4a0@i-love.sakura.ne.jp>
Date:   Sat, 7 Jul 2018 08:10:08 +0900
From:   Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>
To:     Linus Torvalds <torvalds@...ux-foundation.org>,
        "Ken'ichi Ohmichi" <oomichi@....nes.nec.co.jp>,
        Masaki Tachibana <mas-tachibana@...jp.nec.com>,
        Kazuhito Hagio <k-hagio@...jp.nec.com>
Cc:     Kees Cook <keescook@...omium.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] uts: Don't randomize "struct uts_namespace".

Hello Ken'ichi,

I noticed that makedumpfile ( https://sourceforge.net/p/makedumpfile/code/ )
can no longer detect kernel version correctly because "struct uts_namespace"
(which is exposed to userspace via vmcoreinfo) is subjected to randomization
by GCC_PLUGIN_RANDSTRUCT kernel config option since 4.13.

The code was introduced by below commit.

  commit bfc8fe181c822ad0d8495ceda3c7109a407192f0
  Author: ken1_ohmichi <ken1_ohmichi>
  Date:   Fri Dec 22 07:41:14 2006 +0000

      linux-2.6.19 support.
      On linux-2.6.18 or former, the release information could be gotten from
      the symbol "system_utsname". But on linux-2.6.19, it can be done from the
      symbol "init_uts_ns". A new makedumpfile can get the release information
      from the existing symbol.

Can you detect kernel version without using "struct uts_namespace" ?

On 2018/07/07 1:11, Linus Torvalds wrote:
> On Fri, Jul 6, 2018 at 3:07 AM Tetsuo Handa
> <penguin-kernel@...ove.sakura.ne.jp> wrote:
>>
>> I noticed that makedumpfile utility is failing to check kernel version, for
>> it depends on offset of "struct uts_namespace"->name being sizeof(int).
> 
> For something like this, we fix makedumpfile instead. This is not a
> "user program" using system calls etc, this is something that delves
> into the kernel dump and tries to make sense of it.
> 
> Where is the makedumpfile source code? What is it trying to do, and why?
> 
> One option is to just say "hey, you can't make much sense of a
> randomized kernel dump anyway, so don't even try".
> 
>                  Linus
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ