Skip to content

Commit 4026d54

Browse files
committed
Python: Expand bind-to-all-interfaces tests slightly
1 parent c4cca83 commit 4026d54

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
| BindToAllInterfaces_test.py:5:1:5:26 | Attribute() | '0.0.0.0' binds a socket to all interfaces. |
22
| BindToAllInterfaces_test.py:9:1:9:18 | Attribute() | '' binds a socket to all interfaces. |
33
| BindToAllInterfaces_test.py:17:1:17:26 | Attribute() | '0.0.0.0' binds a socket to all interfaces. |
4+
| BindToAllInterfaces_test.py:21:1:21:11 | Attribute() | '0.0.0.0' binds a socket to all interfaces. |

python/ql/test/query-tests/Security/CVE-2018-1281/BindToAllInterfaces_test.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,12 @@
1515
# binds to all interfaces, insecure
1616
ALL_LOCALS = "0.0.0.0"
1717
s.bind((ALL_LOCALS, 9090))
18+
19+
# binds to all interfaces, insecure
20+
tup = (ALL_LOCALS, 8080)
21+
s.bind(tup)
22+
23+
24+
# IPv6
25+
s = socket.socket(socket.AF_INET6, socket.SOCK_STREAM)
26+
s.bind(("::", 8080)) # NOT OK

0 commit comments

Comments
 (0)