cve-2024-49940
Vulnerability from cvelistv5
Published
2024-10-21 18:01
Modified
2024-12-19 09:29
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: l2tp: prevent possible tunnel refcount underflow When a session is created, it sets a backpointer to its tunnel. When the session refcount drops to 0, l2tp_session_free drops the tunnel refcount if session->tunnel is non-NULL. However, session->tunnel is set in l2tp_session_create, before the tunnel refcount is incremented by l2tp_session_register, which leaves a small window where session->tunnel is non-NULL when the tunnel refcount hasn't been bumped. Moving the assignment to l2tp_session_register is trivial but l2tp_session_create calls l2tp_session_set_header_len which uses session->tunnel to get the tunnel's encap. Add an encap arg to l2tp_session_set_header_len to avoid using session->tunnel. If l2tpv3 sessions have colliding IDs, it is possible for l2tp_v3_session_get to race with l2tp_session_register and fetch a session which doesn't yet have session->tunnel set. Add a check for this case.
Impacted products
Vendor Product Version
Linux Linux Version: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
Version: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
Create a notification for this product.
   Linux Linux Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2024-49940",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-10-22T13:37:52.827630Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-10-22T13:38:50.656Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "net/l2tp/l2tp_core.c",
            "net/l2tp/l2tp_core.h",
            "net/l2tp/l2tp_netlink.c",
            "net/l2tp/l2tp_ppp.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "f7415e60c25a6108cd7955a20b2e66b6251ffe02",
              "status": "affected",
              "version": "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2",
              "versionType": "git"
            },
            {
              "lessThan": "24256415d18695b46da06c93135f5b51c548b950",
              "status": "affected",
              "version": "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "net/l2tp/l2tp_core.c",
            "net/l2tp/l2tp_core.h",
            "net/l2tp/l2tp_netlink.c",
            "net/l2tp/l2tp_ppp.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThanOrEqual": "6.11.*",
              "status": "unaffected",
              "version": "6.11.3",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.12",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nl2tp: prevent possible tunnel refcount underflow\n\nWhen a session is created, it sets a backpointer to its tunnel. When\nthe session refcount drops to 0, l2tp_session_free drops the tunnel\nrefcount if session-\u003etunnel is non-NULL. However, session-\u003etunnel is\nset in l2tp_session_create, before the tunnel refcount is incremented\nby l2tp_session_register, which leaves a small window where\nsession-\u003etunnel is non-NULL when the tunnel refcount hasn\u0027t been\nbumped.\n\nMoving the assignment to l2tp_session_register is trivial but\nl2tp_session_create calls l2tp_session_set_header_len which uses\nsession-\u003etunnel to get the tunnel\u0027s encap. Add an encap arg to\nl2tp_session_set_header_len to avoid using session-\u003etunnel.\n\nIf l2tpv3 sessions have colliding IDs, it is possible for\nl2tp_v3_session_get to race with l2tp_session_register and fetch a\nsession which doesn\u0027t yet have session-\u003etunnel set. Add a check for\nthis case."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2024-12-19T09:29:37.918Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/f7415e60c25a6108cd7955a20b2e66b6251ffe02"
        },
        {
          "url": "https://git.kernel.org/stable/c/24256415d18695b46da06c93135f5b51c548b950"
        }
      ],
      "title": "l2tp: prevent possible tunnel refcount underflow",
      "x_generator": {
        "engine": "bippy-5f407fcff5a0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2024-49940",
    "datePublished": "2024-10-21T18:01:59.668Z",
    "dateReserved": "2024-10-21T12:17:06.043Z",
    "dateUpdated": "2024-12-19T09:29:37.918Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2024-49940\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-10-21T18:15:15.703\",\"lastModified\":\"2024-11-13T13:26:01.343\",\"vulnStatus\":\"Analyzed\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nl2tp: prevent possible tunnel refcount underflow\\n\\nWhen a session is created, it sets a backpointer to its tunnel. When\\nthe session refcount drops to 0, l2tp_session_free drops the tunnel\\nrefcount if session-\u003etunnel is non-NULL. However, session-\u003etunnel is\\nset in l2tp_session_create, before the tunnel refcount is incremented\\nby l2tp_session_register, which leaves a small window where\\nsession-\u003etunnel is non-NULL when the tunnel refcount hasn\u0027t been\\nbumped.\\n\\nMoving the assignment to l2tp_session_register is trivial but\\nl2tp_session_create calls l2tp_session_set_header_len which uses\\nsession-\u003etunnel to get the tunnel\u0027s encap. Add an encap arg to\\nl2tp_session_set_header_len to avoid using session-\u003etunnel.\\n\\nIf l2tpv3 sessions have colliding IDs, it is possible for\\nl2tp_v3_session_get to race with l2tp_session_register and fetch a\\nsession which doesn\u0027t yet have session-\u003etunnel set. Add a check for\\nthis case.\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: l2tp: evitar un posible desbordamiento del recuento de referencias del t\u00fanel Cuando se crea una sesi\u00f3n, establece un puntero hacia atr\u00e1s a su t\u00fanel. Cuando el recuento de referencias de la sesi\u00f3n cae a 0, l2tp_session_free descarta el recuento de referencias del t\u00fanel si session-\u0026gt;tunnel no es NULL. Sin embargo, session-\u0026gt;tunnel se establece en l2tp_session_create, antes de que el recuento de referencias del t\u00fanel se incremente mediante l2tp_session_register, lo que deja una peque\u00f1a ventana donde session-\u0026gt;tunnel no es NULL cuando el recuento de referencias del t\u00fanel no se ha incrementado. Mover la asignaci\u00f3n a l2tp_session_register es trivial, pero l2tp_session_create llama a l2tp_session_set_header_len, que usa session-\u0026gt;tunnel para obtener el encap del t\u00fanel. Agregue un argumento de encap a l2tp_session_set_header_len para evitar usar session-\u0026gt;tunnel. Si las sesiones l2tpv3 tienen identificadores en conflicto, es posible que l2tp_v3_session_get compita con l2tp_session_register y obtenga una sesi\u00f3n que a\u00fan no tenga configurado session-\u0026gt;tunnel. Agregue una verificaci\u00f3n para este caso.\"}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H\",\"baseScore\":5.5,\"baseSeverity\":\"MEDIUM\",\"attackVector\":\"LOCAL\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"NONE\",\"integrityImpact\":\"NONE\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":1.8,\"impactScore\":3.6}]},\"weaknesses\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"description\":[{\"lang\":\"en\",\"value\":\"NVD-CWE-noinfo\"}]}],\"configurations\":[{\"nodes\":[{\"operator\":\"OR\",\"negate\":false,\"cpeMatch\":[{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionEndExcluding\":\"6.11.3\",\"matchCriteriaId\":\"6D5FF9C2-A011-4A64-B614-F9244ED2EA0D\"}]}]}],\"references\":[{\"url\":\"https://git.kernel.org/stable/c/24256415d18695b46da06c93135f5b51c548b950\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/f7415e60c25a6108cd7955a20b2e66b6251ffe02\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]}]}}",
    "vulnrichment": {
      "containers": "{\"adp\": [{\"title\": \"CISA ADP Vulnrichment\", \"metrics\": [{\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2024-49940\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"none\"}, {\"Automatable\": \"no\"}, {\"Technical Impact\": \"partial\"}], \"version\": \"2.0.3\", \"timestamp\": \"2024-10-22T13:37:52.827630Z\"}}}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2024-10-22T13:37:56.128Z\"}}], \"cna\": {\"title\": \"l2tp: prevent possible tunnel refcount underflow\", \"affected\": [{\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"1da177e4c3f4\", \"lessThan\": \"f7415e60c25a\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"1da177e4c3f4\", \"lessThan\": \"24256415d186\", \"versionType\": \"git\"}], \"programFiles\": [\"net/l2tp/l2tp_core.c\", \"net/l2tp/l2tp_core.h\", \"net/l2tp/l2tp_netlink.c\", \"net/l2tp/l2tp_ppp.c\"], \"defaultStatus\": \"unaffected\"}, {\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"unaffected\", \"version\": \"6.11.3\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.11.*\"}, {\"status\": \"unaffected\", \"version\": \"6.12-rc1\", \"versionType\": \"original_commit_for_fix\", \"lessThanOrEqual\": \"*\"}], \"programFiles\": [\"net/l2tp/l2tp_core.c\", \"net/l2tp/l2tp_core.h\", \"net/l2tp/l2tp_netlink.c\", \"net/l2tp/l2tp_ppp.c\"], \"defaultStatus\": \"affected\"}], \"references\": [{\"url\": \"https://git.kernel.org/stable/c/f7415e60c25a6108cd7955a20b2e66b6251ffe02\"}, {\"url\": \"https://git.kernel.org/stable/c/24256415d18695b46da06c93135f5b51c548b950\"}], \"x_generator\": {\"engine\": \"bippy-9e1c9544281a\"}, \"descriptions\": [{\"lang\": \"en\", \"value\": \"In the Linux kernel, the following vulnerability has been resolved:\\n\\nl2tp: prevent possible tunnel refcount underflow\\n\\nWhen a session is created, it sets a backpointer to its tunnel. When\\nthe session refcount drops to 0, l2tp_session_free drops the tunnel\\nrefcount if session-\u003etunnel is non-NULL. However, session-\u003etunnel is\\nset in l2tp_session_create, before the tunnel refcount is incremented\\nby l2tp_session_register, which leaves a small window where\\nsession-\u003etunnel is non-NULL when the tunnel refcount hasn\u0027t been\\nbumped.\\n\\nMoving the assignment to l2tp_session_register is trivial but\\nl2tp_session_create calls l2tp_session_set_header_len which uses\\nsession-\u003etunnel to get the tunnel\u0027s encap. Add an encap arg to\\nl2tp_session_set_header_len to avoid using session-\u003etunnel.\\n\\nIf l2tpv3 sessions have colliding IDs, it is possible for\\nl2tp_v3_session_get to race with l2tp_session_register and fetch a\\nsession which doesn\u0027t yet have session-\u003etunnel set. Add a check for\\nthis case.\"}], \"providerMetadata\": {\"orgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"shortName\": \"Linux\", \"dateUpdated\": \"2024-11-05T09:51:57.316Z\"}}}",
      "cveMetadata": "{\"cveId\": \"CVE-2024-49940\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2024-11-05T09:51:57.316Z\", \"dateReserved\": \"2024-10-21T12:17:06.043Z\", \"assignerOrgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"datePublished\": \"2024-10-21T18:01:59.668Z\", \"assignerShortName\": \"Linux\"}",
      "dataType": "CVE_RECORD",
      "dataVersion": "5.1"
    }
  }
}


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.