CVE-2024-35827 (GCVE-0-2024-35827)
Vulnerability from cvelistv5
Published
2024-05-17 13:41
Modified
2026-08-05 11:30
Summary
In the Linux kernel, the following vulnerability has been resolved: io_uring/net: fix overflow check in io_recvmsg_mshot_prep() The "controllen" variable is type size_t (unsigned long). Casting it to int could lead to an integer underflow. The check_add_overflow() function considers the type of the destination which is type int. If we add two positive values and the result cannot fit in an integer then that's counted as an overflow. However, if we cast "controllen" to an int and it turns negative, then negative values *can* fit into an int type so there is no overflow. Good: 100 + (unsigned long)-4 = 96 <-- overflow Bad: 100 + (int)-4 = 96 <-- no overflow I deleted the cast of the sizeof() as well. That's not a bug but the cast is unnecessary.
Impacted products
Vendor Product Version
Linux Linux Version: 9b0fc3c054ff2eb13753104884f1045b5bb3a627
Version: 9b0fc3c054ff2eb13753104884f1045b5bb3a627
Version: 9b0fc3c054ff2eb13753104884f1045b5bb3a627
Version: 9b0fc3c054ff2eb13753104884f1045b5bb3a627
Version: 9b0fc3c054ff2eb13753104884f1045b5bb3a627
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2024-35827",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-05-17T15:12:59.146861Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-06-04T17:34:28.876Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      },
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-02T03:21:48.467Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/868ec868616438df487b9e2baa5a99f8662cc47c"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/59a534690ecc3af72c6ab121aeac1237a4adae66"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/0c8c74bb59e7d77554016efc34c2d10376985e5e"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/b6563ad0d599110bd5cf8f56c47d279c3ed796fe"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/8ede3db5061bb1fe28e2c9683329aafa89d2b1b4"
          }
        ],
        "title": "CVE Program Container"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "io_uring/net.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "868ec868616438df487b9e2baa5a99f8662cc47c",
              "status": "affected",
              "version": "9b0fc3c054ff2eb13753104884f1045b5bb3a627",
              "versionType": "git"
            },
            {
              "lessThan": "59a534690ecc3af72c6ab121aeac1237a4adae66",
              "status": "affected",
              "version": "9b0fc3c054ff2eb13753104884f1045b5bb3a627",
              "versionType": "git"
            },
            {
              "lessThan": "0c8c74bb59e7d77554016efc34c2d10376985e5e",
              "status": "affected",
              "version": "9b0fc3c054ff2eb13753104884f1045b5bb3a627",
              "versionType": "git"
            },
            {
              "lessThan": "b6563ad0d599110bd5cf8f56c47d279c3ed796fe",
              "status": "affected",
              "version": "9b0fc3c054ff2eb13753104884f1045b5bb3a627",
              "versionType": "git"
            },
            {
              "lessThan": "8ede3db5061bb1fe28e2c9683329aafa89d2b1b4",
              "status": "affected",
              "version": "9b0fc3c054ff2eb13753104884f1045b5bb3a627",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "io_uring/net.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.0"
            },
            {
              "lessThan": "6.0",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.83",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.23",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.7.*",
              "status": "unaffected",
              "version": "6.7.11",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.8.*",
              "status": "unaffected",
              "version": "6.8.2",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.9",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.83",
                  "versionStartIncluding": "6.0",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.6.23",
                  "versionStartIncluding": "6.0",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.7.11",
                  "versionStartIncluding": "6.0",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.8.2",
                  "versionStartIncluding": "6.0",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.9",
                  "versionStartIncluding": "6.0",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nio_uring/net: fix overflow check in io_recvmsg_mshot_prep()\n\nThe \"controllen\" variable is type size_t (unsigned long).  Casting it\nto int could lead to an integer underflow.\n\nThe check_add_overflow() function considers the type of the destination\nwhich is type int.  If we add two positive values and the result cannot\nfit in an integer then that\u0027s counted as an overflow.\n\nHowever, if we cast \"controllen\" to an int and it turns negative, then\nnegative values *can* fit into an int type so there is no overflow.\n\nGood: 100 + (unsigned long)-4 = 96  \u003c-- overflow\n Bad: 100 + (int)-4 = 96 \u003c-- no overflow\n\nI deleted the cast of the sizeof() as well.  That\u0027s not a bug but the\ncast is unnecessary."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 7.8,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:L - The vulnerability is reached only through the io_uring syscall interface (io_uring_setup/io_uring_enter submitting an IORING_OP_RECVMSG SQE), which requires local access to the machine. Per kernel scoring guidance io_uring is Local.\nAC:L - The attacker directly supplies the malicious msg_controllen value in their own user_msghdr, and the integer truncation is fully deterministic \u2014 no race, no memory-layout dependency, no timing window. A single submitted SQE reliably bypasses the overflow check.\nPR:L - Any unprivileged local user who can call io_uring_setup() can reach the path; no capability, no CAP_NET_ADMIN, and no root is required, and the socket used can be an ordinary user-created socket. Only the ability to issue syscalls is needed, so basic user privileges suffice.\nUI:N - The attacker submits the crafted recvmsg SQE entirely on their own; no victim action, no filesystem mount, and no privileged process cooperation is needed to trigger the bug.\nS:U - The bypassed check and its consequences stay within the same security authority \u2014 the io_uring context and the address space of the submitting task. No VM, IOMMU, or sandbox boundary is crossed.\nC:H - The bypassed size validation lets the kernel emit io_uring_recvmsg_out headers, sockaddr_storage contents, and control-message data (timestamps, IP_PKTINFO, SCM payloads) into memory beyond the region the request validated, and MSG_CTRUNC is never raised so the truncation is silently hidden. Choosing the higher option for a defeated bounds check on a receive path.\nI:H - The integer underflow defeats the length guard entirely \u2014 hdr can be driven to zero so a zero-length provided buffer is accepted, after which up to ~144 bytes of header plus unbounded cmsg data are written past the validated bounds. This is an attacker-controlled out-of-bounds write with an attacker-chosen offset and length.\nA:H - With msg_controllen set to a near-2^64 value and the header length invariant broken, the recvmsg path operates on corrupted size state and writes outside the validated buffer, producing faults and corrupted request accounting that can be triggered repeatedly by an unprivileged user. Scoring the higher option consistent with a memory-safety violation."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T11:30:10.176Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/868ec868616438df487b9e2baa5a99f8662cc47c"
        },
        {
          "url": "https://git.kernel.org/stable/c/59a534690ecc3af72c6ab121aeac1237a4adae66"
        },
        {
          "url": "https://git.kernel.org/stable/c/0c8c74bb59e7d77554016efc34c2d10376985e5e"
        },
        {
          "url": "https://git.kernel.org/stable/c/b6563ad0d599110bd5cf8f56c47d279c3ed796fe"
        },
        {
          "url": "https://git.kernel.org/stable/c/8ede3db5061bb1fe28e2c9683329aafa89d2b1b4"
        }
      ],
      "title": "io_uring/net: fix overflow check in io_recvmsg_mshot_prep()",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2024-35827",
    "datePublished": "2024-05-17T13:41:09.193Z",
    "dateReserved": "2024-05-17T12:19:12.347Z",
    "dateUpdated": "2026-08-05T11:30:10.176Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "vulnrichment": {
      "containers": "{\"adp\": [{\"title\": \"CVE Program Container\", \"references\": [{\"url\": \"https://git.kernel.org/stable/c/868ec868616438df487b9e2baa5a99f8662cc47c\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://git.kernel.org/stable/c/59a534690ecc3af72c6ab121aeac1237a4adae66\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://git.kernel.org/stable/c/0c8c74bb59e7d77554016efc34c2d10376985e5e\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://git.kernel.org/stable/c/b6563ad0d599110bd5cf8f56c47d279c3ed796fe\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://git.kernel.org/stable/c/8ede3db5061bb1fe28e2c9683329aafa89d2b1b4\", \"tags\": [\"x_transferred\"]}], \"providerMetadata\": {\"orgId\": \"af854a3a-2127-422b-91ae-364da2661108\", \"shortName\": \"CVE\", \"dateUpdated\": \"2024-08-02T03:21:48.467Z\"}}, {\"metrics\": [{\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2024-35827\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"none\"}, {\"Automatable\": \"no\"}, {\"Technical Impact\": \"partial\"}], \"version\": \"2.0.3\", \"timestamp\": \"2024-05-17T15:12:59.146861Z\"}}}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2024-05-23T19:01:24.547Z\"}, \"title\": \"CISA ADP Vulnrichment\"}], \"cna\": {\"title\": \"io_uring/net: fix overflow check in io_recvmsg_mshot_prep()\", \"metrics\": [{\"cvssV3_1\": {\"version\": \"3.1\", \"baseScore\": 7.8, \"baseSeverity\": \"HIGH\", \"vectorString\": \"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H\"}, \"scenarios\": [{\"lang\": \"en\", \"value\": \"AV:L - The vulnerability is reached only through the io_uring syscall interface (io_uring_setup/io_uring_enter submitting an IORING_OP_RECVMSG SQE), which requires local access to the machine. Per kernel scoring guidance io_uring is Local.\\nAC:L - The attacker directly supplies the malicious msg_controllen value in their own user_msghdr, and the integer truncation is fully deterministic \\u2014 no race, no memory-layout dependency, no timing window. A single submitted SQE reliably bypasses the overflow check.\\nPR:L - Any unprivileged local user who can call io_uring_setup() can reach the path; no capability, no CAP_NET_ADMIN, and no root is required, and the socket used can be an ordinary user-created socket. Only the ability to issue syscalls is needed, so basic user privileges suffice.\\nUI:N - The attacker submits the crafted recvmsg SQE entirely on their own; no victim action, no filesystem mount, and no privileged process cooperation is needed to trigger the bug.\\nS:U - The bypassed check and its consequences stay within the same security authority \\u2014 the io_uring context and the address space of the submitting task. No VM, IOMMU, or sandbox boundary is crossed.\\nC:H - The bypassed size validation lets the kernel emit io_uring_recvmsg_out headers, sockaddr_storage contents, and control-message data (timestamps, IP_PKTINFO, SCM payloads) into memory beyond the region the request validated, and MSG_CTRUNC is never raised so the truncation is silently hidden. Choosing the higher option for a defeated bounds check on a receive path.\\nI:H - The integer underflow defeats the length guard entirely \\u2014 hdr can be driven to zero so a zero-length provided buffer is accepted, after which up to ~144 bytes of header plus unbounded cmsg data are written past the validated bounds. This is an attacker-controlled out-of-bounds write with an attacker-chosen offset and length.\\nA:H - With msg_controllen set to a near-2^64 value and the header length invariant broken, the recvmsg path operates on corrupted size state and writes outside the validated buffer, producing faults and corrupted request accounting that can be triggered repeatedly by an unprivileged user. Scoring the higher option consistent with a memory-safety violation.\"}]}], \"affected\": [{\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"9b0fc3c054ff2eb13753104884f1045b5bb3a627\", \"lessThan\": \"868ec868616438df487b9e2baa5a99f8662cc47c\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"9b0fc3c054ff2eb13753104884f1045b5bb3a627\", \"lessThan\": \"59a534690ecc3af72c6ab121aeac1237a4adae66\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"9b0fc3c054ff2eb13753104884f1045b5bb3a627\", \"lessThan\": \"0c8c74bb59e7d77554016efc34c2d10376985e5e\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"9b0fc3c054ff2eb13753104884f1045b5bb3a627\", \"lessThan\": \"b6563ad0d599110bd5cf8f56c47d279c3ed796fe\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"9b0fc3c054ff2eb13753104884f1045b5bb3a627\", \"lessThan\": \"8ede3db5061bb1fe28e2c9683329aafa89d2b1b4\", \"versionType\": \"git\"}], \"programFiles\": [\"io_uring/net.c\"], \"defaultStatus\": \"unaffected\"}, {\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"6.0\"}, {\"status\": \"unaffected\", \"version\": \"0\", \"lessThan\": \"6.0\", \"versionType\": \"semver\"}, {\"status\": \"unaffected\", \"version\": \"6.1.83\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.1.*\"}, {\"status\": \"unaffected\", \"version\": \"6.6.23\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.6.*\"}, {\"status\": \"unaffected\", \"version\": \"6.7.11\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.7.*\"}, {\"status\": \"unaffected\", \"version\": \"6.8.2\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.8.*\"}, {\"status\": \"unaffected\", \"version\": \"6.9\", \"versionType\": \"original_commit_for_fix\", \"lessThanOrEqual\": \"*\"}], \"programFiles\": [\"io_uring/net.c\"], \"defaultStatus\": \"affected\"}], \"references\": [{\"url\": \"https://git.kernel.org/stable/c/868ec868616438df487b9e2baa5a99f8662cc47c\"}, {\"url\": \"https://git.kernel.org/stable/c/59a534690ecc3af72c6ab121aeac1237a4adae66\"}, {\"url\": \"https://git.kernel.org/stable/c/0c8c74bb59e7d77554016efc34c2d10376985e5e\"}, {\"url\": \"https://git.kernel.org/stable/c/b6563ad0d599110bd5cf8f56c47d279c3ed796fe\"}, {\"url\": \"https://git.kernel.org/stable/c/8ede3db5061bb1fe28e2c9683329aafa89d2b1b4\"}], \"x_generator\": {\"engine\": \"bippy-1.2.0\"}, \"descriptions\": [{\"lang\": \"en\", \"value\": \"In the Linux kernel, the following vulnerability has been resolved:\\n\\nio_uring/net: fix overflow check in io_recvmsg_mshot_prep()\\n\\nThe \\\"controllen\\\" variable is type size_t (unsigned long).  Casting it\\nto int could lead to an integer underflow.\\n\\nThe check_add_overflow() function considers the type of the destination\\nwhich is type int.  If we add two positive values and the result cannot\\nfit in an integer then that\u0027s counted as an overflow.\\n\\nHowever, if we cast \\\"controllen\\\" to an int and it turns negative, then\\nnegative values *can* fit into an int type so there is no overflow.\\n\\nGood: 100 + (unsigned long)-4 = 96  \u003c-- overflow\\n Bad: 100 + (int)-4 = 96 \u003c-- no overflow\\n\\nI deleted the cast of the sizeof() as well.  That\u0027s not a bug but the\\ncast is unnecessary.\"}], \"cpeApplicability\": [{\"nodes\": [{\"negate\": false, \"cpeMatch\": [{\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.1.83\", \"versionStartIncluding\": \"6.0\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.6.23\", \"versionStartIncluding\": \"6.0\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.7.11\", \"versionStartIncluding\": \"6.0\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.8.2\", \"versionStartIncluding\": \"6.0\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.9\", \"versionStartIncluding\": \"6.0\"}], \"operator\": \"OR\"}]}], \"providerMetadata\": {\"orgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"shortName\": \"Linux\", \"dateUpdated\": \"2026-08-05T11:30:10.176Z\"}}}",
      "cveMetadata": "{\"cveId\": \"CVE-2024-35827\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2026-08-05T11:30:10.176Z\", \"dateReserved\": \"2024-05-17T12:19:12.347Z\", \"assignerOrgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"datePublished\": \"2024-05-17T13:41:09.193Z\", \"assignerShortName\": \"Linux\"}",
      "dataType": "CVE_RECORD",
      "dataVersion": "5.2"
    }
  }
}


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.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • 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.


Loading…

Loading…