]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - ti-linux-kernel/ti-linux-kernel-next.git/commit
net: ipv4: fix for a race condition in raw_sendmsg
authorMohamed Ghannam <simo.ghannam@gmail.com>
Sun, 10 Dec 2017 03:50:58 +0000 (03:50 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Jan 2018 19:33:25 +0000 (20:33 +0100)
commitbe27b620a861dc2a143b78e81e23f5622d9105da
tree9e41ad5740380a64e07904a50ee8013f4607457f
parent6dfc02ba5149946f8a82a254d275670bcf211acb
net: ipv4: fix for a race condition in raw_sendmsg

[ Upstream commit 8f659a03a0ba9289b9aeb9b4470e6fb263d6f483 ]

inet->hdrincl is racy, and could lead to uninitialized stack pointer
usage, so its value should be read only once.

Fixes: c008ba5bdc9f ("ipv4: Avoid reading user iov twice after raw_probe_proto_opt")
Signed-off-by: Mohamed Ghannam <simo.ghannam@gmail.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv4/raw.c