Commit 6196963f authored by Herbert Xu's avatar Herbert Xu Committed by Yongqiang Liu
Browse files

crypto: seqiv - Handle EBUSY correctly

stable inclusion
from stable-v4.19.276
commit 1effbddaff60eeef8017c6dea1ee0ed970164d14
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I6TIG1


CVE: NA

--------------------------------

[ Upstream commit 32e62025 ]

As it is seqiv only handles the special return value of EINPROGERSS,
which means that in all other cases it will free data related to the
request.

However, as the caller of seqiv may specify MAY_BACKLOG, we also need
to expect EBUSY and treat it in the same way.  Otherwise backlogged
requests will trigger a use-after-free.

Fixes: 0a270321 ("[CRYPTO] seqiv: Add Sequence Number IV Generator")
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarYongqiang Liu <liuyongqiang13@huawei.com>
parent 11b6c1a2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment