Skip to content

Commit

Permalink
crypto: cavium/nitrox - Use after free in process_response_list()
Browse files Browse the repository at this point in the history
We free "sr" and then dereference it on the next line.

Fixes: c961333 ("crypto: cavium/nitrox - Added AEAD cipher support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
Dan Carpenter authored and Herbert Xu committed Jan 10, 2019
1 parent a777336 commit 06bbf75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/crypto/cavium/nitrox/nitrox_reqmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -567,10 +567,10 @@ static void process_response_list(struct nitrox_cmdq *cmdq)

/* ORH error code */
err = READ_ONCE(*sr->resp.orh) & 0xff;
softreq_destroy(sr);

if (sr->callback)
sr->callback(sr->cb_arg, err);
softreq_destroy(sr);

req_completed++;
}
Expand Down

0 comments on commit 06bbf75

Please sign in to comment.