diff --git a/advisories/github-reviewed/2024/11/GHSA-xg58-75qf-9r67/GHSA-xg58-75qf-9r67.json b/advisories/github-reviewed/2024/11/GHSA-xg58-75qf-9r67/GHSA-xg58-75qf-9r67.json index ba81809e884..04a823ac287 100644 --- a/advisories/github-reviewed/2024/11/GHSA-xg58-75qf-9r67/GHSA-xg58-75qf-9r67.json +++ b/advisories/github-reviewed/2024/11/GHSA-xg58-75qf-9r67/GHSA-xg58-75qf-9r67.json @@ -1,13 +1,13 @@ { "schema_version": "1.4.0", "id": "GHSA-xg58-75qf-9r67", - "modified": "2024-11-25T21:46:54Z", + "modified": "2024-12-03T18:11:16Z", "published": "2024-11-25T19:35:10Z", "aliases": [ "CVE-2024-52529" ], "summary": "Cilium's Layer 7 policy enforcement may not occur in policies with wildcarded port ranges", - "details": "### Impact\n\nFor users with the following configuration:\n\n* An allow policy that selects a [Layer 3 destination](https://docs.cilium.io/en/v1.14/security/policy/language/#layer-3-examples) and a [port range](https://docs.cilium.io/en/stable/security/policy/language/#example-port-ranges) **AND**\n* A [Layer 7 allow policy](https://docs.cilium.io/en/latest/security/policy/language/#layer-7-examples) that selects a specific port within the first policy's range \n\nthen Layer 7 enforcement would not occur for the traffic selected by the Layer 7 policy.\n\nThis issue only affects users who use Cilium's port range functionality, which was introduced in Cilium v1.16.\n\nFor reference, an example of a pair of policies that would trigger this issue is:\n\n```\napiVersion: \"cilium.io/v2\"\nkind: CiliumNetworkPolicy\nmetadata:\n name: \"l3-port-range-rule\"\nspec:\n endpointSelector:\n matchLabels:\n app: service\n ingress:\n - fromCIDR:\n - 192.168.60.0/24\n toPorts:\n - ports:\n - port: \"80\"\n endPort: 444\n protocol: TCP\n```\nand\n```\napiVersion: \"cilium.io/v2\"\nkind: CiliumNetworkPolicy\nmetadata:\n name: \"l7-port-range-rule\"\nspec:\n endpointSelector:\n matchLabels:\n app: service\n ingress:\n toPorts:\n - ports:\n - port: \"80\"\n protocol: TCP\n rules:\n http:\n - method: \"GET\"\n path: \"/public\"\n```\n\nIn the above example, requests would be permitted to all HTTP paths on matching endpoints, rather than just `GET` requests to the `/public` path as intentded by the `l7-port-range-rule` policy. In patched versions of Cilium, the `l7-port-range-rule` would take precedence over the `l3-port-range-rule`.\n\n### Patches\n\nThis issue is patched in https://github.com/cilium/cilium/pull/35150.\n\nThis issue affects Cilium v1.16 between v1.16.0 and v1.16.3 inclusive.\n\nThis issue is patched in Cilium v1.16.4.\n\n### Workarounds\n\nUsers with network policies that match the pattern described above can work around the issue by rewriting any policies that use port ranges to individually specify the ports permitted for traffic.\n\n### Acknowledgements\nThe Cilium community has worked together with members of Isovalent to prepare these mitigations. Special thanks to @jrajahalme for resolving this issue.\n\n### For more information\nIf you have any questions or comments about this advisory, please reach out on [Slack](https://docs.cilium.io/en/latest/community/community/#slack).\n\nIf you think you have found a vulnerability affecting Cilium, we strongly encourage you to report it to our security mailing list at [security@cilium.io](mailto:security@cilium.io). This is a private mailing list for the Cilium security team, and your report will be treated as top priority.\n", + "details": "### Impact\n\nFor users with the following configuration:\n\n* An allow policy that selects a [Layer 3 destination](https://docs.cilium.io/en/v1.14/security/policy/language/#layer-3-examples) and a [port range](https://docs.cilium.io/en/stable/security/policy/language/#example-port-ranges) **AND**\n* A [Layer 7 allow policy](https://docs.cilium.io/en/latest/security/policy/language/#layer-7-examples) that selects a specific port within the first policy's range \n\nthen Layer 7 enforcement would not occur for the traffic selected by the Layer 7 policy.\n\nThis issue only affects users who use Cilium's port range functionality, which was introduced in Cilium v1.16.\n\nFor reference, an example of a pair of policies that would trigger this issue is:\n\n```\napiVersion: \"cilium.io/v2\"\nkind: CiliumNetworkPolicy\nmetadata:\n name: \"layer-3-and-4\"\nspec:\n endpointSelector:\n matchLabels:\n app: service\n ingress:\n - fromCIDR:\n - 192.168.60.0/24\n toPorts:\n - ports:\n - port: \"80\"\n endPort: 444\n protocol: TCP\n```\nand\n```\napiVersion: \"cilium.io/v2\"\nkind: CiliumNetworkPolicy\nmetadata:\n name: \"layer-4-and-7\"\nspec:\n endpointSelector:\n matchLabels:\n app: service\n ingress:\n toPorts:\n - ports:\n - port: \"80\"\n protocol: TCP\n rules:\n http:\n - method: \"GET\"\n path: \"/public\"\n```\n\nIn the above example, requests would be permitted to all HTTP paths on matching endpoints, rather than just `GET` requests to the `/public` path as intentded by the `l7-port-range-rule` policy. In patched versions of Cilium, the `l7-port-range-rule` would take precedence over the `l3-port-range-rule`.\n\n### Patches\n\nThis issue is patched in https://github.com/cilium/cilium/pull/35150.\n\nThis issue affects Cilium v1.16 between v1.16.0 and v1.16.3 inclusive.\n\nThis issue is patched in Cilium v1.16.4.\n\n### Workarounds\n\nUsers with network policies that match the pattern described above can work around the issue by rewriting any policies that use port ranges to individually specify the ports permitted for traffic.\n\n### Acknowledgements\nThe Cilium community has worked together with members of Isovalent to prepare these mitigations. Special thanks to @jrajahalme for resolving this issue.\n\n### For more information\nIf you have any questions or comments about this advisory, please reach out on [Slack](https://docs.cilium.io/en/latest/community/community/#slack).\n\nIf you think you have found a vulnerability affecting Cilium, we strongly encourage you to report it to our security mailing list at [security@cilium.io](mailto:security@cilium.io). This is a private mailing list for the Cilium security team, and your report will be treated as top priority.\n", "severity": [ { "type": "CVSS_V3",