apache / apache/cloudstack

ACL with multiple CIDRs does not honor rule id

未关闭
#12,668 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
component:virtual-router status:needs-reproducing
主要语言
Java
星标
3.1k
派生
1.4k
平均合并
6 天 19 小时
30 天内合并 PR
32

描述

### problem

If you have a CIDR list like:

rule 1: [ "1.2.3.4/32", "2.3.4.5/32"] tcp allow port 22
rule 65535: [ "0.0.0.0/0"] deny port any

What you end up with when inspecting the VR is:

```
-A ACL_OUTBOUND_eth12 -d 1.2.3.4/32 -p tcp -m tcp --dport 22 -j ACCEPT
-A ACL_OUTBOUND_eth12 -j DROP
-A ACL_OUTBOUND_eth12 -d 2.3.4.5/32 -p tcp -m tcp --dport 22 -j ACCEPT
```

This is clearly not the desired behavior.

### versions

Cloudstack 4.22.0

### The steps to reproduce the bug

See description

### What to do about it?

Don't use more than one CIDR per rule

贡献指南

打开贡献指南

调研方向

使用报告中的两条 ACL 规则重现该问题,然后检查虚拟路由器中生成的 ACL_OUTBOUND_eth12 链。跟踪一条规则中的多个 CIDR 是如何排序的,并验证该规则的 DROP 不会先于剩余的 CIDR 匹配;当 allow 规则中的所有 CIDR 都在下一条规则之前完成评估时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

领域
authorization, networking, security
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。