summaryrefslogtreecommitdiff
path: root/samples/workqueue/git@git.tavy.me:linux-stable.git
diff options
context:
space:
mode:
authorDouya Le <ldy3087146292@gmail.com>2026-04-02 23:34:55 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2026-04-03 08:54:14 +0800
commit8eceab19eba9dcbfd2a0daec72e1bf48aa100170 (patch)
treeea0b8568d17a29d20cbe45573af4e1d8f9146dc5 /samples/workqueue/git@git.tavy.me:linux-stable.git
parente02494114ebf7c8b42777c6cd6982f113bfdbec7 (diff)
crypto: af_alg - limit RX SG extraction by receive buffer budget
Make af_alg_get_rsgl() limit each RX scatterlist extraction to the remaining receive buffer budget. af_alg_get_rsgl() currently uses af_alg_readable() only as a gate before extracting data into the RX scatterlist. Limit each extraction to the remaining af_alg_rcvbuf(sk) budget so that receive-side accounting matches the amount of data attached to the request. If skcipher cannot obtain enough RX space for at least one chunk while more data remains to be processed, reject the recvmsg call instead of rounding the request length down to zero. Fixes: e870456d8e7c8d57c059ea479b5aadbb55ff4c3a ("crypto: algif_skcipher - overhaul memory management") Reported-by: Yifan Wu <yifanwucs@gmail.com> Reported-by: Juefei Pu <tomapufckgml@gmail.com> Co-developed-by: Yuan Tan <yuantan098@gmail.com> Signed-off-by: Yuan Tan <yuantan098@gmail.com> Suggested-by: Xin Liu <bird@lzu.edu.cn> Signed-off-by: Douya Le <ldy3087146292@gmail.com> Signed-off-by: Ren Wei <n05ec@lzu.edu.cn> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'samples/workqueue/git@git.tavy.me:linux-stable.git')
0 files changed, 0 insertions, 0 deletions