Описание
Incus Allocation of Resources Without Limits allows firewall rule bypass on managed bridge networks
Summary
When using an ACL on a device connected to a bridge, Incus generates nftables rules for local services (DHCP, DNS...) that partially bypass security options security.mac_filtering
, security.ipv4_filtering
and security.ipv6_filtering
. This can lead to DHCP pool exhaustion and opens the door for other attacks.
Details
In commit a7c33301738aede3c035063e973b1d885d9bac7c, the following rules are added at the top of the bridge input chain:
However, these rules accept packets that should be filtered and maybe dropped by later rules in the "MAC filtering" snippet:
Therefore, the MAC filtering is ineffective on those new rules. This allows an attacker to request as many IP as they want by sending a lot of DHCP requests with different MAC addresses. Doing so, they can exhaust the DHCP pool, resulting in a DoS of the bridge's network.
Additionaly, the commit adds non-restricted access to the local dnsmasq DNS server:
An attacker can send DNS requests with arbitrary MAC and IP addresses as well. These rules should also be after the MAC/IPv4/IPv6 filtering.
PoC
With this terraform infrastructure:
An attacker in a VM requests many IP addresses and exhaust the pool:
At this point, machine2 will not receive a lease from dnsmasq until another lease expires. If machine1 renews their malicious leases, machine2 will never get a lease.
Impact
All versions since a7c33301738aede3c035063e973b1d885d9bac7c, so basically v6.12 and v6.13.
Пакеты
github.com/lxc/incus/v6
>= 6.12, <= 6.13
6.14
Связанные уязвимости
Incus is a system container and virtual machine manager. When using an ACL on a device connected to a bridge, Incus version 6.12 and 6.13 generates nftables rules for local services (DHCP, DNS...) that partially bypass security options `security.mac_filtering`, `security.ipv4_filtering` and `security.ipv6_filtering`. This can lead to DHCP pool exhaustion and opens the door for other attacks. A patch is available at commit 2516fb19ad8428454cb4edfe70c0a5f0dc1da214.
Incus is a system container and virtual machine manager. When using an ACL on a device connected to a bridge, Incus version 6.12 and 6.13 generates nftables rules for local services (DHCP, DNS...) that partially bypass security options `security.mac_filtering`, `security.ipv4_filtering` and `security.ipv6_filtering`. This can lead to DHCP pool exhaustion and opens the door for other attacks. A patch is available at commit 2516fb19ad8428454cb4edfe70c0a5f0dc1da214.
Incus is a system container and virtual machine manager. When using an ...
Уязвимость системы управления контейнерами и менеджера виртуальных машин Incus, связанная с неограниченным распределением ресурсов, позволяющая нарушителю обойти ограничения безопасности и вызвать отказ в обслуживании