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-next>] [day] [month] [year] [list]
Date:	Thu, 17 Mar 2016 18:59:58 +0100
From:	Nicolai Stange <nicstange@...il.com>
To:	Herbert Xu <herbert@...dor.apana.org.au>
Cc:	Tadeusz Struk <tadeusz.struk@...el.com>,
	Michal Marek <mmarek@...e.com>,
	Andrzej Zaborowski <andrew.zaborowski@...el.com>,
	Stephan Mueller <smueller@...onox.de>,
	Arnd Bergmann <arnd@...db.de>, linux-kernel@...r.kernel.org,
	Nicolai Stange <nicstange@...il.com>
Subject: [PATCH 0/8] lib/mpi: bug fixes and cleanup

With linux-next-20160317, KASAN splats for both, mpi_write_sgl()
and mpi_read_buffer().

While the first isn't dramatic on x86 (as long as it doesn't fault),
the latter potentially overwrites unrelated memory.

These two issues are fixed by

  [4/8] ("lib/mpi: mpi_write_sgl(): fix out-of-bounds stack access")

and

  [8/8] ("lib/mpi: mpi_read_buffer(): fix buffer overflow")


While reviewing the code, I found another bug, c.f.

  [1/8] ("lib/mpi: mpi_write_sgl(): fix skipping of leading zero limbs")


The rest are cleanup/style patches I couldn't hold back ;)

There is still room for improvement in that the leading zero handling
could get easily moved out of the loop, but that's not the business of
this series.


Specifically. this patchset fixes

  2d4d1eea540b ("lib/mpi: Add mpi sgl helpers")

and

  9cbe21d8f89d ("lib/mpi: only require buffers as big as needed for
                 the integer")


 
This series is applicable to linux-next-20160317.


Nicolai Stange (8):
  lib/mpi: mpi_write_sgl(): fix skipping of leading zero limbs
  lib/mpi: mpi_write_sgl(): fix style issue with lzero decrement
  lib/mpi: mpi_write_sgl(): purge redundant pointer arithmetic
  lib/mpi: mpi_write_sgl(): fix out-of-bounds stack access
  lib/mpi: mpi_write_sgl(): replace open coded endian conversion
  lib/mpi: mpi_read_buffer(): optimize skipping of leading zero limbs
  lib/mpi: mpi_read_buffer(): replace open coded endian conversion
  lib/mpi: mpi_read_buffer(): fix buffer overflow

 lib/mpi/mpicoder.c | 91 ++++++++++++++++++++----------------------------------
 1 file changed, 33 insertions(+), 58 deletions(-)

-- 
2.7.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ