]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
crypto: af_alg - Fix page reassignment overflow in af_alg_pull_tsgl
authorHerbert Xu <herbert@gondor.apana.org.au>
Sat, 4 Apr 2026 00:29:58 +0000 (08:29 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sun, 12 Apr 2026 05:38:19 +0000 (13:38 +0800)
commit31d00156e50ecad37f2cb6cbf04aaa9a260505ef
tree4c3c33ab33c116e7f0f977adbd1672aaec8a5d9f
parent8eceab19eba9dcbfd2a0daec72e1bf48aa100170
crypto: af_alg - Fix page reassignment overflow in af_alg_pull_tsgl

When page reassignment was added to af_alg_pull_tsgl the original
loop wasn't updated so it may try to reassign one more page than
necessary.

Add the check to the reassignment so that this does not happen.

Also update the comment which still refers to the obsolete offset
argument.

Reported-by: syzbot+d23888375c2737c17ba5@syzkaller.appspotmail.com
Fixes: e870456d8e7c ("crypto: algif_skcipher - overhaul memory management")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/af_alg.c