]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
Smack: Fix handling of IPv4 traffic received by PF_INET6 sockets
authorPiotr Sawicki <p.sawicki2@partner.samsung.com>
Thu, 19 Jul 2018 09:42:58 +0000 (11:42 +0200)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:48:44 +0000 (19:48 -0600)
commit5d3d626dbbea662f8d1f72504e872cdfa904f428
treeba8f2f7d62461b92d0e24572ab2eddc2ee263d5f
parent3c10687b7112459b95639f7ca9637973bfe405c3
Smack: Fix handling of IPv4 traffic received by PF_INET6 sockets

BugLink: https://bugs.launchpad.net/bugs/1836117
[ Upstream commit 129a99890936766f4b69b9da7ed88366313a9210 ]

A socket which has sk_family set to PF_INET6 is able to receive not
only IPv6 but also IPv4 traffic (IPv4-mapped IPv6 addresses).

Prior to this patch, the smk_skb_to_addr_ipv6() could have been
called for socket buffers containing IPv4 packets, in result such
traffic was allowed.

Signed-off-by: Piotr Sawicki <p.sawicki2@partner.samsung.com>
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
security/smack/smack_lsm.c