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] [day] [month] [year] [list]
Message-ID: <CA+8MBb+qpjMJNxWA8FCwNwrPUTZK1gU=GaXMEO3YKUaGo3qLUQ@mail.gmail.com>
Date:	Thu, 14 Jan 2016 18:06:53 -0800
From:	Tony Luck <tony.luck@...il.com>
To:	Matt Fleming <matt@...eblueprint.co.uk>
Cc:	Insu Yun <wuninsu@...il.com>,
	"linux-efi@...r.kernel.org" <linux-efi@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"taesoo@...ech.edu" <taesoo@...ech.edu>,
	"yeongjin.jang@...ech.edu" <yeongjin.jang@...ech.edu>,
	"insu@...ech.edu" <insu@...ech.edu>,
	"changwoo@...ech.edu" <changwoo@...ech.edu>
Subject: Re: [PATCH] efi: fix out-of-bounds null overwrite vulnerability

On Thu, Jan 14, 2016 at 3:12 AM, Matt Fleming <matt@...eblueprint.co.uk> wrote:
> What about *before* the NUL? That was the point I was trying to make.
> If the string you print into the buffer isn't 'len' bytes in size the
> buffer will look like,
>
>   "DIMM location: Foo bar<garbage.....>\0"

Doesn't that actually look like:

    "DIMM location: Foo bar\0<garbage.....>\0"

snprintf() will NUL terminate what it writes into the buffer
if the buffer is big enough for what you were trying to
write there.  The problem happens when what you want
to write is too big. Then you have

    "DIMM location: ReallyLongFoo AlsoBar"


at which point "msg[len] = '\0'; will zap that 'r'
at the end to make sure printk() will stop at the
end of the valid part of buffer.

-Tony

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ