lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sun, 31 Mar 2013 06:29:44 +0900 From: ko-zu <causeless@...il.com> To: netdev@...r.kernel.org Subject: BUG: IPv6: ipv6_bind fails on implicitly-assigned address Current Any-IP support for IPv6, introduced with this commit http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=ab79ad14a2d51e95f0ac3cef7cd116a57089ba82 , allows to assign whole subnet to host but current implemantation does not allow binding assigned address to socket without IP_FREEBIND sockopt. When an ipv6 address was assigned as Any-IP, ipv6_bind() fails with EADDRNOTAVAIL error because ipv6_chk_addr() does not consider Any-IP as locally hosted. To reproduce this bug, # assign whole subnet to host ip -4 route add local 192.0.2.0/24 dev lo ip -6 route add local 2001:db8::/32 dev lo python -c ' import socket IP_FREEBIND = 15 print "IPv4 without IP_FREEBIND" s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.bind(("192.0.2.123", 10000)) print "IPv6 with IP_FREEBIND" s = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM) s.setsockopt(socket.SOL_IP, IP_FREEBIND, 1) s.bind(("2001:db8::1234", 10000)) print "IPv6 without IP_FREEBIND" s = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM) s.bind(("2001:db8::5678", 10000)) print "should success without error." ' -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists