af_key: Fix send_acquire race with pfkey_register
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2164865 Upstream Status: net.git commit 7f57f816 Conflicts: hunks in count_ah_combs(), count_esp_combs() not applied as RHEL9 is already aligned to patched upstream kernel commit 7f57f816 Author: Herbert Xu <herbert@gondor.apana.org.au> Date: Tue Oct 25 14:06:48 2022 +0800 af_key: Fix send_acquire race with pfkey_register The function pfkey_send_acquire may race with pfkey_register (which could even be in a different name space). This may result in a buffer overrun. Allocating the maximum amount of memory that could be used prevents this. Reported-by:<syzbot+1e9af9185d8850e2c2fa@syzkaller.appspotmail.com> Fixes: 1da177e4 ("Linux-2.6.12-rc2") Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au> Reviewed-by:
Sabrina Dubroca <sd@queasysnail.net> Reviewed-by:
Eric Dumazet <edumazet@google.com> Signed-off-by:
Steffen Klassert <steffen.klassert@secunet.com> Signed-off-by:
Davide Caratti <dcaratti@redhat.com>
Loading
Please register or sign in to comment