]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
ipv6: fix restrict IPV6_ADDRFORM operation
authorJohn Haxby <john.haxby@oracle.com>
Sat, 18 Apr 2020 15:30:49 +0000 (16:30 +0100)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 25 May 2020 08:41:40 +0000 (10:41 +0200)
commit0254925b12dafd79d77ecbec979be71436481ca5
treec3380c00bd6edb49aab16dc0d152f65bb57117c7
parent59eabbbf3b5f738ee35275ad27330b2235cd1d26
ipv6: fix restrict IPV6_ADDRFORM operation

BugLink: https://bugs.launchpad.net/bugs/1876361
[ Upstream commit 82c9ae440857840c56e05d4fb1427ee032531346 ]

Commit b6f6118901d1 ("ipv6: restrict IPV6_ADDRFORM operation") fixed a
problem found by syzbot an unfortunate logic error meant that it
also broke IPV6_ADDRFORM.

Rearrange the checks so that the earlier test is just one of the series
of checks made before moving the socket from IPv6 to IPv4.

Fixes: b6f6118901d1 ("ipv6: restrict IPV6_ADDRFORM operation")
Signed-off-by: John Haxby <john.haxby@oracle.com>
Cc: stable@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
net/ipv6/ipv6_sockglue.c