diff options
author | Leonidas S. Barbosa <leosilva@linux.vnet.ibm.com> | 2014-10-28 15:50:45 -0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2014-11-06 23:15:03 +0800 |
commit | f129430dd87dfe868845292e661b186fbfa89ce3 (patch) | |
tree | 450b9efa606062ddf30b501405b0b18cefeaff24 /.gitignore | |
parent | 000851119e80edd46443250a1c89d3c45cd6eeca (diff) |
crypto: nx - Fixing the limit number of bytes to be processed
The previous limits were estimated locally in a single step
basead on bound values, however it was not correct since
when given certain scatterlist the function nx_build_sg_lists
was consuming more sg entries than allocated causing a
memory corruption and crashes.
e.g.: in the worst case we could have one sg entry for a single byte.
This patch fixes it modifying the logic of the bound limit
moving it to nx_sg_build_lists and set a correct sg_max limit,
adding a trim function to ensure the bound in sg_list. Also fixing
nx_build_sg_list NULL and untreated return in case of overflow.
Signed-off-by: Leonidas S. Barbosa <leosilva@linux.vnet.ibm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions