Skip to content

lib/mpi: bug fixes and cleanup

Nicolai Stange linux-crypto lkml 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest14 patches 2 repliesIn review
  2. v2 posting 2/214 patches 3 repliesSuperseded
  3. v2 posting 1/214 patches 2 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v18 patches1 replySuperseded

Changes to v2 from the cover letter

- [8/14] ("lib/mpi: mpi_read_buffer(): fix buffer overflow")
+ Fix the pointer arithmetic issue found by Tadeusz Struk

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14lib/mpi: mpi_write_sgl(): fix skipping of leading zero limbslib/mpi/mpicoder.c+9 -120 replies
2/14lib/mpi: mpi_write_sgl(): fix style issue with lzero decrementlib/mpi/mpicoder.c+2 -20 replies
3/14lib/mpi: mpi_write_sgl(): purge redundant pointer arithmeticlib/mpi/mpicoder.c+1 -20 replies
4/14lib/mpi: mpi_write_sgl(): fix out-of-bounds stack accesslib/mpi/mpicoder.c+1 -50 replies
5/14lib/mpi: mpi_write_sgl(): replace open coded endian conversionlib/mpi/mpicoder.c+11 -160 replies
6/14lib/mpi: mpi_read_buffer(): optimize skipping of leading zero limbslib/mpi/mpicoder.c+8 -100 replies
7/14lib/mpi: mpi_read_buffer(): replace open coded endian conversionlib/mpi/mpicoder.c+12 -150 replies
8/14lib/mpi: mpi_read_buffer(): fix buffer overflowlib/mpi/mpicoder.c+3 -100 replies
9/14lib/mpi: mpi_read_raw_from_sgl(): replace len argument by nbyteslib/mpi/mpicoder.c+4 -40 replies
10/14lib/mpi: mpi_read_raw_from_sgl(): don't include leading zero SGEs in nbyteslib/mpi/mpicoder.c+2 -60 replies
11/14lib/mpi: mpi_read_raw_from_sgl(): purge redundant clearing of nbitslib/mpi/mpicoder.c+0 -20 replies
12/14lib/mpi: mpi_read_raw_from_sgl(): fix nbits calculationlib/mpi/mpicoder.c+2 -10 replies
13/14lib/mpi: mpi_read_raw_from_sgl(): sanitize meaning of indiceslib/mpi/mpicoder.c+3 -60 replies
14/14lib/mpi: mpi_read_raw_from_sgl(): fix out-of-bounds buffer accesslib/mpi/mpicoder.c+0 -30 replies

Reviews trailers per patch

None of the 14 patches has a Reviewed-by or Acked-by.

PatchTadeusz Struk
SeriesT-b
1/14
2/14
3/14
4/14
5/14
6/14
7/14
8/14
9/14
10/14
11/14
12/14
13/14
14/14

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 00/14] lib/mpi: bug fixes and cleanup

Former v2 can be found here:

http://lkml.kernel.org/g/[email protected]

This v3 series incorporates a fix to the pointer arithmetic issue in v2's [8/14] ("lib/mpi: mpi_read_buffer(): fix buffer overflow") spotted by Tadeusz Struk.

The rest, that is [1-7,9-14/14], go unchanged and have got a

already.

Applicable to linux-next-20160322.

Changes to v2:
- [8/14] ("lib/mpi: mpi_read_buffer(): fix buffer overflow")
+ Fix the pointer arithmetic issue found by Tadeusz Struk

Changes to v1:
- [1-8/14]

    former [1-8/8], unchanged.

- [9-14/14]
Added in v2. Fixes to mpi_read_raw_from_sgl().

Nicolai Stange (14):
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: mpi_read_raw_from_sgl(): replace len argument by nbytes lib/mpi: mpi_read_raw_from_sgl(): don't include leading zero SGEs in
nbytes
lib/mpi: mpi_read_raw_from_sgl(): purge redundant clearing of nbits lib/mpi: mpi_read_raw_from_sgl(): fix nbits calculation lib/mpi: mpi_read_raw_from_sgl(): sanitize meaning of indices lib/mpi: mpi_read_raw_from_sgl(): fix out-of-bounds buffer access

 lib/mpi/mpicoder.c | 122 +++++++++++++++++++----------------------------------
 1 file changed, 43 insertions(+), 79 deletions(-)
Signature · 1 line
2.7.4