summaryrefslogtreecommitdiff
path: root/crypto/ecc_curve_defs.h
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2023-07-07 12:12:38 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2023-07-08 15:48:42 +0300
commit0b7ec177b589842c0abf9e91459c83ba28d32452 (patch)
tree31082b1925f8697113c73038e890650f12986a59 /crypto/ecc_curve_defs.h
parent9e9311e04e63ede92be98425efd843f9836336bd (diff)
downloadlinux-0b7ec177b589842c0abf9e91459c83ba28d32452.tar.xz
crypto: algif_hash - Fix race between MORE and non-MORE sends
The 'MSG_MORE' state of the previous sendmsg() is fetched without the socket lock held, so two sendmsg calls can race. This can be seen with a large sendfile() as that now does a series of sendmsg() calls, and if a write() comes in on the same socket at an inopportune time, it can flip the state. Fix this by moving the fetch of ctx->more inside the socket lock. Fixes: c662b043cdca ("crypto: af_alg/hash: Support MSG_SPLICE_PAGES") Reported-by: syzbot+689ec3afb1ef07b766b2@syzkaller.appspotmail.com Link: https://lore.kernel.org/r/000000000000554b8205ffdea64e@google.com/ Signed-off-by: David Howells <dhowells@redhat.com> Tested-by: syzbot+689ec3afb1ef07b766b2@syzkaller.appspotmail.com cc: Herbert Xu <herbert@gondor.apana.org.au> cc: Paolo Abeni <pabeni@redhat.com> cc: "David S. Miller" <davem@davemloft.net> cc: Eric Dumazet <edumazet@google.com> cc: Jakub Kicinski <kuba@kernel.org> cc: linux-crypto@vger.kernel.org cc: netdev@vger.kernel.org Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/ecc_curve_defs.h')
0 files changed, 0 insertions, 0 deletions