af_key: Fix send_acquire race with pfkey_register
stable inclusion from stable-v4.19.268 commit 0c76cb8dcaf2561c7acef006af29ab9709fe001c category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I69KBO CVE: NA -------------------------------- [ Upstream commit 7f57f816 ] 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:
Sasha Levin <sashal@kernel.org> Signed-off-by:
Yongqiang Liu <liuyongqiang13@huawei.com>
Loading
Please sign in to comment