Skip to content
Snippets Groups Projects
Commit a879ee6b authored by Davide Caratti's avatar Davide Caratti
Browse files

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: default avatar <syzbot+1e9af9185d8850e2c2fa@syzkaller.appspotmail.com>
    Fixes: 1da177e4 ("Linux-2.6.12-rc2")
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Reviewed-by: default avatarSabrina Dubroca <sd@queasysnail.net>
Reviewed-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>

Signed-off-by: default avatarDavide Caratti <dcaratti@redhat.com>
parent c8d55554
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment