cve-2024-27415
Vulnerability from cvelistv5
Published
2024-05-17 11:51
Modified
2024-11-05 09:21
Severity ?
Summary
netfilter: bridge: confirm multicast packets before passing them up the stack
Impacted products
Vendor Product Version
Linux Linux Version: 2.6.12
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-02T00:34:52.234Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/7c3f28599652acf431a2211168de4a583f30b6d5"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/2b1414d5e94e477edff1d2c79030f1d742625ea0"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/80cd0487f630b5382734997c3e5e3003a77db315"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/cb734975b0ffa688ff6cc0eed463865bf07b6c01"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/62e7151ae3eb465e0ab52a20c941ff33bb6332e9"
          }
        ],
        "title": "CVE Program Container"
      },
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2024-27415",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-09-10T15:43:06.843956Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-09-11T17:33:24.879Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "include/linux/netfilter.h",
            "net/bridge/br_netfilter_hooks.c",
            "net/bridge/netfilter/nf_conntrack_bridge.c",
            "net/netfilter/nf_conntrack_core.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "7c3f28599652",
              "status": "affected",
              "version": "1da177e4c3f4",
              "versionType": "git"
            },
            {
              "lessThan": "2b1414d5e94e",
              "status": "affected",
              "version": "1da177e4c3f4",
              "versionType": "git"
            },
            {
              "lessThan": "80cd0487f630",
              "status": "affected",
              "version": "1da177e4c3f4",
              "versionType": "git"
            },
            {
              "lessThan": "cb734975b0ff",
              "status": "affected",
              "version": "1da177e4c3f4",
              "versionType": "git"
            },
            {
              "lessThan": "62e7151ae3eb",
              "status": "affected",
              "version": "1da177e4c3f4",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "include/linux/netfilter.h",
            "net/bridge/br_netfilter_hooks.c",
            "net/bridge/netfilter/nf_conntrack_bridge.c",
            "net/netfilter/nf_conntrack_core.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "2.6.12"
            },
            {
              "lessThan": "2.6.12",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.151",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.81",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.21",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.7.*",
              "status": "unaffected",
              "version": "6.7.9",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.8",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nnetfilter: bridge: confirm multicast packets before passing them up the stack\n\nconntrack nf_confirm logic cannot handle cloned skbs referencing\nthe same nf_conn entry, which will happen for multicast (broadcast)\nframes on bridges.\n\n Example:\n    macvlan0\n       |\n      br0\n     /  \\\n  ethX    ethY\n\n ethX (or Y) receives a L2 multicast or broadcast packet containing\n an IP packet, flow is not yet in conntrack table.\n\n 1. skb passes through bridge and fake-ip (br_netfilter)Prerouting.\n    -\u003e skb-\u003e_nfct now references a unconfirmed entry\n 2. skb is broad/mcast packet. bridge now passes clones out on each bridge\n    interface.\n 3. skb gets passed up the stack.\n 4. In macvlan case, macvlan driver retains clone(s) of the mcast skb\n    and schedules a work queue to send them out on the lower devices.\n\n    The clone skb-\u003e_nfct is not a copy, it is the same entry as the\n    original skb.  The macvlan rx handler then returns RX_HANDLER_PASS.\n 5. Normal conntrack hooks (in NF_INET_LOCAL_IN) confirm the orig skb.\n\nThe Macvlan broadcast worker and normal confirm path will race.\n\nThis race will not happen if step 2 already confirmed a clone. In that\ncase later steps perform skb_clone() with skb-\u003e_nfct already confirmed (in\nhash table).  This works fine.\n\nBut such confirmation won\u0027t happen when eb/ip/nftables rules dropped the\npackets before they reached the nf_confirm step in postrouting.\n\nPablo points out that nf_conntrack_bridge doesn\u0027t allow use of stateful\nnat, so we can safely discard the nf_conn entry and let inet call\nconntrack again.\n\nThis doesn\u0027t work for bridge netfilter: skb could have a nat\ntransformation. Also bridge nf prevents re-invocation of inet prerouting\nvia \u0027sabotage_in\u0027 hook.\n\nWork around this problem by explicit confirmation of the entry at LOCAL_IN\ntime, before upper layer has a chance to clone the unconfirmed entry.\n\nThe downside is that this disables NAT and conntrack helpers.\n\nAlternative fix would be to add locking to all code parts that deal with\nunconfirmed packets, but even if that could be done in a sane way this\nopens up other problems, for example:\n\n-m physdev --physdev-out eth0 -j SNAT --snat-to 1.2.3.4\n-m physdev --physdev-out eth1 -j SNAT --snat-to 1.2.3.5\n\nFor multicast case, only one of such conflicting mappings will be\ncreated, conntrack only handles 1:1 NAT mappings.\n\nUsers should set create a setup that explicitly marks such traffic\nNOTRACK (conntrack bypass) to avoid this, but we cannot auto-bypass\nthem, ruleset might have accept rules for untracked traffic already,\nso user-visible behaviour would change."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2024-11-05T09:21:48.166Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/7c3f28599652acf431a2211168de4a583f30b6d5"
        },
        {
          "url": "https://git.kernel.org/stable/c/2b1414d5e94e477edff1d2c79030f1d742625ea0"
        },
        {
          "url": "https://git.kernel.org/stable/c/80cd0487f630b5382734997c3e5e3003a77db315"
        },
        {
          "url": "https://git.kernel.org/stable/c/cb734975b0ffa688ff6cc0eed463865bf07b6c01"
        },
        {
          "url": "https://git.kernel.org/stable/c/62e7151ae3eb465e0ab52a20c941ff33bb6332e9"
        }
      ],
      "title": "netfilter: bridge: confirm multicast packets before passing them up the stack",
      "x_generator": {
        "engine": "bippy-9e1c9544281a"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2024-27415",
    "datePublished": "2024-05-17T11:51:00.711Z",
    "dateReserved": "2024-02-25T13:47:42.682Z",
    "dateUpdated": "2024-11-05T09:21:48.166Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2024-27415\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-05-17T12:15:12.867\",\"lastModified\":\"2024-11-21T09:04:34.623\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nnetfilter: bridge: confirm multicast packets before passing them up the stack\\n\\nconntrack nf_confirm logic cannot handle cloned skbs referencing\\nthe same nf_conn entry, which will happen for multicast (broadcast)\\nframes on bridges.\\n\\n Example:\\n    macvlan0\\n       |\\n      br0\\n     /  \\\\\\n  ethX    ethY\\n\\n ethX (or Y) receives a L2 multicast or broadcast packet containing\\n an IP packet, flow is not yet in conntrack table.\\n\\n 1. skb passes through bridge and fake-ip (br_netfilter)Prerouting.\\n    -\u003e skb-\u003e_nfct now references a unconfirmed entry\\n 2. skb is broad/mcast packet. bridge now passes clones out on each bridge\\n    interface.\\n 3. skb gets passed up the stack.\\n 4. In macvlan case, macvlan driver retains clone(s) of the mcast skb\\n    and schedules a work queue to send them out on the lower devices.\\n\\n    The clone skb-\u003e_nfct is not a copy, it is the same entry as the\\n    original skb.  The macvlan rx handler then returns RX_HANDLER_PASS.\\n 5. Normal conntrack hooks (in NF_INET_LOCAL_IN) confirm the orig skb.\\n\\nThe Macvlan broadcast worker and normal confirm path will race.\\n\\nThis race will not happen if step 2 already confirmed a clone. In that\\ncase later steps perform skb_clone() with skb-\u003e_nfct already confirmed (in\\nhash table).  This works fine.\\n\\nBut such confirmation won\u0027t happen when eb/ip/nftables rules dropped the\\npackets before they reached the nf_confirm step in postrouting.\\n\\nPablo points out that nf_conntrack_bridge doesn\u0027t allow use of stateful\\nnat, so we can safely discard the nf_conn entry and let inet call\\nconntrack again.\\n\\nThis doesn\u0027t work for bridge netfilter: skb could have a nat\\ntransformation. Also bridge nf prevents re-invocation of inet prerouting\\nvia \u0027sabotage_in\u0027 hook.\\n\\nWork around this problem by explicit confirmation of the entry at LOCAL_IN\\ntime, before upper layer has a chance to clone the unconfirmed entry.\\n\\nThe downside is that this disables NAT and conntrack helpers.\\n\\nAlternative fix would be to add locking to all code parts that deal with\\nunconfirmed packets, but even if that could be done in a sane way this\\nopens up other problems, for example:\\n\\n-m physdev --physdev-out eth0 -j SNAT --snat-to 1.2.3.4\\n-m physdev --physdev-out eth1 -j SNAT --snat-to 1.2.3.5\\n\\nFor multicast case, only one of such conflicting mappings will be\\ncreated, conntrack only handles 1:1 NAT mappings.\\n\\nUsers should set create a setup that explicitly marks such traffic\\nNOTRACK (conntrack bypass) to avoid this, but we cannot auto-bypass\\nthem, ruleset might have accept rules for untracked traffic already,\\nso user-visible behaviour would change.\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se resolvi\u00f3 la siguiente vulnerabilidad: netfilter: bridge: confirme los paquetes de multidifusi\u00f3n antes de pasarlos a la pila conntrack La l\u00f3gica nf_confirm no puede manejar skbs clonados que hagan referencia a la misma entrada nf_conn, lo que suceder\u00e1 con las tramas de multidifusi\u00f3n (difusi\u00f3n) en puentes. Ejemplo: macvlan0 | br0 / \\\\ ethX ethY ethX (o Y) recibe un paquete de multidifusi\u00f3n o difusi\u00f3n L2 que contiene un paquete IP, el flujo a\u00fan no est\u00e1 en la tabla conntrack. 1. skb pasa por el puente y el enrutamiento previo de IP falsa (br_netfilter). -\u0026gt; skb-\u0026gt;_nfct ahora hace referencia a una entrada no confirmada 2. skb es un paquete amplio/mcast. El puente ahora pasa clones en cada interfaz del puente. 3. skb pasa a la pila. 4. En el caso de macvlan, el controlador macvlan conserva los clones del skb mcast y programa una cola de trabajo para enviarlos a los dispositivos inferiores. El clon skb-\u0026gt;_nfct no es una copia, es la misma entrada que el skb original. El controlador macvlan rx luego devuelve RX_HANDLER_PASS. 5. Los ganchos de conexi\u00f3n normales (en NF_INET_LOCAL_IN) confirman el skb original. El trabajador de transmisi\u00f3n de Macvlan y la ruta de confirmaci\u00f3n normal correr\u00e1n. Esta carrera no se realizar\u00e1 si el paso 2 ya confirm\u00f3 un clon. En ese caso, los pasos posteriores realizan skb_clone() con skb-\u0026gt;_nfct ya confirmado (en la tabla hash). Esto funciona bien. Pero dicha confirmaci\u00f3n no ocurrir\u00e1 cuando las reglas eb/ip/nftables eliminen los paquetes antes de que alcancen el paso nf_confirm en el posenrutamiento. Pablo se\u00f1ala que nf_conntrack_bridge no permite el uso de nat con estado, por lo que podemos descartar con seguridad la entrada nf_conn y dejar que inet llame a conntrack nuevamente. Esto no funciona para bridge netfilter: skb podr\u00eda tener una transformaci\u00f3n nat. Adem\u00e1s, bridge nf evita la reinvocaci\u00f3n del enrutamiento previo de inet a trav\u00e9s del gancho \u0027sabotage_in\u0027. Evite este problema confirmando expl\u00edcitamente la entrada en el momento LOCAL_IN, antes de que la capa superior tenga la oportunidad de clonar la entrada no confirmada. La desventaja es que esto desactiva NAT y los asistentes de conexi\u00f3n. Una soluci\u00f3n alternativa ser\u00eda agregar bloqueo a todas las partes del c\u00f3digo que tratan con paquetes no confirmados, pero incluso si eso pudiera hacerse de manera sensata, esto abre otros problemas, por ejemplo: -m physdev --physdev-out eth0 -j SNAT - -snat-to 1.2.3.4 -m physdev --physdev-out eth1 -j SNAT --snat-to 1.2.3.5 Para el caso de multidifusi\u00f3n, solo se crear\u00e1 una de estas asignaciones conflictivas, conntrack solo maneja asignaciones NAT 1:1. Los usuarios deben crear una configuraci\u00f3n que marque expl\u00edcitamente dicho tr\u00e1fico NOTRACK (omisi\u00f3n de conntrack) para evitar esto, pero no podemos omitirlos autom\u00e1ticamente, es posible que el conjunto de reglas ya haya aceptado reglas para el tr\u00e1fico sin seguimiento, por lo que el comportamiento visible para el usuario cambiar\u00eda.\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/2b1414d5e94e477edff1d2c79030f1d742625ea0\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/62e7151ae3eb465e0ab52a20c941ff33bb6332e9\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/7c3f28599652acf431a2211168de4a583f30b6d5\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/80cd0487f630b5382734997c3e5e3003a77db315\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/cb734975b0ffa688ff6cc0eed463865bf07b6c01\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/2b1414d5e94e477edff1d2c79030f1d742625ea0\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://git.kernel.org/stable/c/62e7151ae3eb465e0ab52a20c941ff33bb6332e9\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://git.kernel.org/stable/c/7c3f28599652acf431a2211168de4a583f30b6d5\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://git.kernel.org/stable/c/80cd0487f630b5382734997c3e5e3003a77db315\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://git.kernel.org/stable/c/cb734975b0ffa688ff6cc0eed463865bf07b6c01\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"}]}}"
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.