Commit 52a82e23 authored by Ursula Braun's avatar Ursula Braun Committed by David S. Miller

af_iucv: Validate socket address length in iucv_sock_bind()

Signed-off-by: default avatarUrsula Braun <>
Reported-by: default avatarDmitry Vyukov <>
Reviewed-by: default avatarEvgeny Cherkashin <>
Signed-off-by: default avatarDavid S. Miller <>
parent ed0dfffd
......@@ -708,6 +708,9 @@ static int iucv_sock_bind(struct socket *sock, struct sockaddr *addr,
if (!addr || addr->sa_family != AF_IUCV)
return -EINVAL;
if (addr_len < sizeof(struct sockaddr_iucv))
return -EINVAL;
if (sk->sk_state != IUCV_OPEN) {
err = -EBADFD;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment