Fix security vulnerability in caclmgrd#139
Merged
qiluo-msft merged 1 commit intosonic-net:masterfrom Jul 23, 2024
Merged
Conversation
Signed-off-by: Zhaohui Sun <zhaohuisun@microsoft.com>
bingwang-ms
approved these changes
Jul 23, 2024
|
LGTM. The test code in sonic-mgmt repo also need to be updated. |
8 tasks
Contributor
Author
|
sonic-net/sonic-mgmt#13786 test case update |
wangxin
pushed a commit
to sonic-net/sonic-mgmt
that referenced
this pull request
Jul 29, 2024
What is the motivation for this PR? RP test will fail after sonic-net/sonic-host-services#139, update the case accordingly. How did you do it? add expected iptable rules How did you verify/test it? run cacl/test_cacl_application.py Signed-off-by: Zhaohui Sun <zhaohuisun@microsoft.com>
mssonicbld
pushed a commit
to mssonicbld/sonic-host-services
that referenced
this pull request
Jul 29, 2024
- description: After installation, a default iptables rule allows an attacker to bypass all others rules protecting the switch management & control-plane. - Mitigation: Accept only ttl-lt 2 for ICMP packets, or possibly dst-port > 1024. Traceroute may be based on ICMP or UDP or TCP. For ICMP: accept all icmp protocol TTL < 2 packets For UDP: accept UDP protocol TTL < 2 and UDP dest port > 1024 packets For TCP: accept TCP protocol TTL < 2 and TCP dest port > 1024 packets For other mismatched packets, default action is drop - work item: 28662516
|
Cherry-pick PR to 202405: #141 |
mssonicbld
pushed a commit
that referenced
this pull request
Jul 29, 2024
- description: After installation, a default iptables rule allows an attacker to bypass all others rules protecting the switch management & control-plane. - Mitigation: Accept only ttl-lt 2 for ICMP packets, or possibly dst-port > 1024. Traceroute may be based on ICMP or UDP or TCP. For ICMP: accept all icmp protocol TTL < 2 packets For UDP: accept UDP protocol TTL < 2 and UDP dest port > 1024 packets For TCP: accept TCP protocol TTL < 2 and TCP dest port > 1024 packets For other mismatched packets, default action is drop - work item: 28662516
ZhaohuiS
added a commit
to ZhaohuiS/sonic-mgmt
that referenced
this pull request
Jul 31, 2024
) What is the motivation for this PR? RP test will fail after sonic-net/sonic-host-services#139, update the case accordingly. How did you do it? add expected iptable rules How did you verify/test it? run cacl/test_cacl_application.py Signed-off-by: Zhaohui Sun <zhaohuisun@microsoft.com>
8 tasks
arista-hpandya
pushed a commit
to arista-hpandya/sonic-mgmt
that referenced
this pull request
Oct 2, 2024
) What is the motivation for this PR? RP test will fail after sonic-net/sonic-host-services#139, update the case accordingly. How did you do it? add expected iptable rules How did you verify/test it? run cacl/test_cacl_application.py Signed-off-by: Zhaohui Sun <zhaohuisun@microsoft.com>
vikshaw-Nokia
pushed a commit
to vikshaw-Nokia/sonic-mgmt
that referenced
this pull request
Oct 23, 2024
) What is the motivation for this PR? RP test will fail after sonic-net/sonic-host-services#139, update the case accordingly. How did you do it? add expected iptable rules How did you verify/test it? run cacl/test_cacl_application.py Signed-off-by: Zhaohui Sun <zhaohuisun@microsoft.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After installation, a default iptables rule allows people to bypass all others rules protecting the switch management & control-plane.
Accept only ttl-lt 2 for ICMP packets, or possibly dst-port > 1024.
Traceroute may be based on ICMP or UDP or TCP.
The original behavior:
Add iptables/ip6tables commands to allow all incoming packets with TTL of 0 or 1
The behavior after change:
For ICMP: accept all icmp protocol TTL < 2 packets
For UDP: accept UDP protocol TTL < 2 and UDP dest port > 1024 packets
For TCP: accept TCP protocol TTL < 2 and TCP dest port > 1024 packets
For other mismatched packets, default action is drop
28662516