summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorXin Long <lucien.xin@gmail.com>2017-02-24 16:29:06 +0800
committerDavid S. Miller <davem@davemloft.net>2017-02-26 21:25:46 -0500
commit99253eb750fda6a644d5188fb26c43bad8d5a745 (patch)
tree473e3e941cd23e1d99b9ace71583a39182bf48e5 /lib
parent2e3ce5bc2aa938653c3866aa7f4901a1f199b1c8 (diff)
downloadlinux-99253eb750fda6a644d5188fb26c43bad8d5a745.tar.gz
linux-99253eb750fda6a644d5188fb26c43bad8d5a745.tar.xz
ipv6: check sk sk_type and protocol early in ip_mroute_set/getsockopt
Commit 5e1859fbcc3c ("ipv4: ipmr: various fixes and cleanups") fixed the issue for ipv4 ipmr: ip_mroute_setsockopt() & ip_mroute_getsockopt() should not access/set raw_sk(sk)->ipmr_table before making sure the socket is a raw socket, and protocol is IGMP The same fix should be done for ipv6 ipmr as well. This patch can fix the panic caused by overwriting the same offset as ipmr_table as in raw_sk(sk) when accessing other type's socket by ip_mroute_setsockopt(). Signed-off-by: Xin Long <lucien.xin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions