cve-2021-47515
Vulnerability from cvelistv5
Published
2024-05-24 15:09
Modified
2024-11-04 12:07
Severity ?
Summary
seg6: fix the iif in the IPv6 socket control block
Impacted products
LinuxLinux
LinuxLinux
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-04T05:39:59.755Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/b16d412e5f79734033df04e97d7ea2f50a8e9fe3"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/6431e71093f3da586a00c6d931481ffb0dc2db0e"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/ef8804e47c0a44ae106ead1740408af5ea6c6ee9"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/666521b3852d2b2f52d570f9122b1e4b50d96831"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/98adb2bbfa407c9290bda299d4c6f7a1c4ebd5e1"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/ae68d93354e5bf5191ee673982251864ea24dd5c"
          }
        ],
        "title": "CVE Program Container"
      },
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2021-47515",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-09-10T15:35:33.340330Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-09-11T17:32:52.378Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "net/ipv6/seg6_iptunnel.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "b16d412e5f79",
              "status": "affected",
              "version": "c630ec8bdada",
              "versionType": "git"
            },
            {
              "lessThan": "6431e71093f3",
              "status": "affected",
              "version": "2f704348c93f",
              "versionType": "git"
            },
            {
              "lessThan": "ef8804e47c0a",
              "status": "affected",
              "version": "ef489749aae5",
              "versionType": "git"
            },
            {
              "lessThan": "666521b3852d",
              "status": "affected",
              "version": "ef489749aae5",
              "versionType": "git"
            },
            {
              "lessThan": "98adb2bbfa40",
              "status": "affected",
              "version": "ef489749aae5",
              "versionType": "git"
            },
            {
              "lessThan": "ae68d93354e5",
              "status": "affected",
              "version": "ef489749aae5",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "net/ipv6/seg6_iptunnel.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.0"
            },
            {
              "lessThan": "5.0",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "4.14.*",
              "status": "unaffected",
              "version": "4.14.258",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "4.19.*",
              "status": "unaffected",
              "version": "4.19.221",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.4.*",
              "status": "unaffected",
              "version": "5.4.165",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.85",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.8",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "5.16",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nseg6: fix the iif in the IPv6 socket control block\n\nWhen an IPv4 packet is received, the ip_rcv_core(...) sets the receiving\ninterface index into the IPv4 socket control block (v5.16-rc4,\nnet/ipv4/ip_input.c line 510):\n\n    IPCB(skb)-\u003eiif = skb-\u003eskb_iif;\n\nIf that IPv4 packet is meant to be encapsulated in an outer IPv6+SRH\nheader, the seg6_do_srh_encap(...) performs the required encapsulation.\nIn this case, the seg6_do_srh_encap function clears the IPv6 socket control\nblock (v5.16-rc4 net/ipv6/seg6_iptunnel.c line 163):\n\n    memset(IP6CB(skb), 0, sizeof(*IP6CB(skb)));\n\nThe memset(...) was introduced in commit ef489749aae5 (\"ipv6: sr: clear\nIP6CB(skb) on SRH ip4ip6 encapsulation\") a long time ago (2019-01-29).\n\nSince the IPv6 socket control block and the IPv4 socket control block share\nthe same memory area (skb-\u003ecb), the receiving interface index info is lost\n(IP6CB(skb)-\u003eiif is set to zero).\n\nAs a side effect, that condition triggers a NULL pointer dereference if\ncommit 0857d6f8c759 (\"ipv6: When forwarding count rx stats on the orig\nnetdev\") is applied.\n\nTo fix that issue, we set the IP6CB(skb)-\u003eiif with the index of the\nreceiving interface once again."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2024-11-04T12:07:25.308Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/b16d412e5f79734033df04e97d7ea2f50a8e9fe3"
        },
        {
          "url": "https://git.kernel.org/stable/c/6431e71093f3da586a00c6d931481ffb0dc2db0e"
        },
        {
          "url": "https://git.kernel.org/stable/c/ef8804e47c0a44ae106ead1740408af5ea6c6ee9"
        },
        {
          "url": "https://git.kernel.org/stable/c/666521b3852d2b2f52d570f9122b1e4b50d96831"
        },
        {
          "url": "https://git.kernel.org/stable/c/98adb2bbfa407c9290bda299d4c6f7a1c4ebd5e1"
        },
        {
          "url": "https://git.kernel.org/stable/c/ae68d93354e5bf5191ee673982251864ea24dd5c"
        }
      ],
      "title": "seg6: fix the iif in the IPv6 socket control block",
      "x_generator": {
        "engine": "bippy-9e1c9544281a"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2021-47515",
    "datePublished": "2024-05-24T15:09:29.334Z",
    "dateReserved": "2024-05-24T15:02:54.824Z",
    "dateUpdated": "2024-11-04T12:07:25.308Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2021-47515\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-05-24T15:15:12.937\",\"lastModified\":\"2024-05-24T18:09:20.027\",\"vulnStatus\":\"Awaiting Analysis\",\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nseg6: fix the iif in the IPv6 socket control block\\n\\nWhen an IPv4 packet is received, the ip_rcv_core(...) sets the receiving\\ninterface index into the IPv4 socket control block (v5.16-rc4,\\nnet/ipv4/ip_input.c line 510):\\n\\n    IPCB(skb)-\u003eiif = skb-\u003eskb_iif;\\n\\nIf that IPv4 packet is meant to be encapsulated in an outer IPv6+SRH\\nheader, the seg6_do_srh_encap(...) performs the required encapsulation.\\nIn this case, the seg6_do_srh_encap function clears the IPv6 socket control\\nblock (v5.16-rc4 net/ipv6/seg6_iptunnel.c line 163):\\n\\n    memset(IP6CB(skb), 0, sizeof(*IP6CB(skb)));\\n\\nThe memset(...) was introduced in commit ef489749aae5 (\\\"ipv6: sr: clear\\nIP6CB(skb) on SRH ip4ip6 encapsulation\\\") a long time ago (2019-01-29).\\n\\nSince the IPv6 socket control block and the IPv4 socket control block share\\nthe same memory area (skb-\u003ecb), the receiving interface index info is lost\\n(IP6CB(skb)-\u003eiif is set to zero).\\n\\nAs a side effect, that condition triggers a NULL pointer dereference if\\ncommit 0857d6f8c759 (\\\"ipv6: When forwarding count rx stats on the orig\\nnetdev\\\") is applied.\\n\\nTo fix that issue, we set the IP6CB(skb)-\u003eiif with the index of the\\nreceiving interface once again.\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: seg6: corrige el iif en el bloque de control del socket IPv6 Cuando se recibe un paquete IPv4, ip_rcv_core(...) establece el \u00edndice de la interfaz de recepci\u00f3n en el bloque de control del socket IPv4 (v5 .16-rc4, net/ipv4/ip_input.c l\u00ednea 510): IPCB(skb)-\u0026gt;iif = skb-\u0026gt;skb_iif; Si ese paquete IPv4 debe encapsularse en un encabezado IPv6+SRH externo, seg6_do_srh_encap(...) realiza la encapsulaci\u00f3n requerida. En este caso, la funci\u00f3n seg6_do_srh_encap borra el bloque de control del socket IPv6 (v5.16-rc4 net/ipv6/seg6_iptunnel.c l\u00ednea 163): memset(IP6CB(skb), 0, sizeof(*IP6CB(skb))); El memset(...) se introdujo en El commit ef489749aae5 (\\\"ipv6: sr: clear IP6CB(skb) en la encapsulaci\u00f3n SRH ip4ip6\\\") hace mucho tiempo (29 de enero de 2019). Dado que el bloque de control del socket IPv6 y el bloque de control del socket IPv4 comparten la misma \u00e1rea de memoria (skb-\u0026gt;cb), la informaci\u00f3n del \u00edndice de la interfaz de recepci\u00f3n se pierde (IP6CB(skb)-\u0026gt;iif se establece en cero). Como efecto secundario, esa condici\u00f3n desencadena una desreferencia del puntero NULL si se aplica el commit 0857d6f8c759 (\\\"ipv6: al reenviar estad\u00edsticas de recuento de rx en el netdev original\\\"). Para solucionar ese problema, configuramos IP6CB(skb)-\u0026gt;iif con el \u00edndice de la interfaz de recepci\u00f3n una vez m\u00e1s.\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/6431e71093f3da586a00c6d931481ffb0dc2db0e\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/666521b3852d2b2f52d570f9122b1e4b50d96831\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/98adb2bbfa407c9290bda299d4c6f7a1c4ebd5e1\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/ae68d93354e5bf5191ee673982251864ea24dd5c\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/b16d412e5f79734033df04e97d7ea2f50a8e9fe3\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/ef8804e47c0a44ae106ead1740408af5ea6c6ee9\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
  }
}


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.