Skip to content
Heist/ feed
Back to feed
UnratedFix available

tcp: Fix shift-out-of-bounds in dctcp_update_alpha().

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: tcp: Fix shift-out-of-bounds in dctcp_update_alpha(). In dctcp_update_alpha(), we use a module parameter dctcp_shift_g as follows: alpha -= min_not_zero(alpha, alpha >> dctcp_shift_g); ... delivered_ce <<= (10 - dctcp_shift_g); It seems syzkaller started fuzzing module parameters and triggered shift-out-of-bounds [0] by setting 100 to dctcp_shift_g: memcpy((void*)0x20000080, "/sys/module/tcp_dctcp/parameters/dctcp_shift_g\000", 47); res = syscall(__NR_openat, /*fd=*/0xffffffffffffff9cul, /*file=*/0x20000080ul, /*flags=*/2ul, /*mode=*/0ul); memcpy((void*)0x20000000, "100\000", 4); syscall(__NR_write, /*fd=*/r[0], /*val=*/0x20000000ul, /*len=*/4ul); Let's limit the max value of dctcp_shift_g by param_set_uint_minmax(). With this patch: # echo 10 > /sys/module/tcp_dctcp/parameters/dctcp_shift_g # cat /sys/module/tcp_dctcp/parameters/dctcp_shift_g 10 # echo 11 > /sys/module/tcp_dctcp/parameters/dctcp_shift_g -bash: echo: write error: Invalid argument [0]: UBSAN: shift-out-of-bounds in net/ipv4/tcp_dctcp.c:143:12 shift exponent 100 is too large for 32-bit type 'u32' (aka 'unsigned int') CPU: 0 PID: 8083 Comm: syz-executor345 Not tainted 6.9.0-05151-g1b294a1f3561 #2 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x201/0x300 lib/dump_stack.c:114 ubsan_epilogue lib/ubsan.c:231 [inline] __ubsan_handle_shift_o

Products
Kernel
Affected versions
Not specified
Fixed versions
4.19.316, 5.10.219, 5.15.161, 5.4.278, 6.1.93, 6.6.33, 6.9.4
CVEs
CVE-2024-37356
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 12:48 UTC · Revision 1

Source evidence

tcp: Fix shift-out-of-bounds in dctcp_update_alpha().

core-osv · Original source

Published 21 Jun 2024, 10:18 UTC

In the Linux kernel, the following vulnerability has been resolved: tcp: Fix shift-out-of-bounds in dctcp_update_alpha(). In dctcp_update_alpha(), we use a module parameter dctcp_shift_g as follows: alpha -= min_not_zero(alpha, alpha >> dctcp_shift_g); ... delivered_ce <<= (10 - dctcp_shift_g); It seems syzkaller started fuzzing module parameters and triggered shift-out-of-bounds [0] by setting 100 to dctcp_shift_g: memcpy((void*)0x20000080, "/sys/module/tcp_dctcp/parameters/dctcp_shift_g\000", 47); res = syscall(__NR_openat, /*fd=*/0xffffffffffffff9cul, /*file=*/0x20000080ul, /*flags=*/2ul, /*mode=*/0ul); memcpy((void*)0x20000000, "100\000", 4); syscall(__NR_write, /*fd=*/r[0], /*val=*/0x20000000ul, /*len=*/4ul); Let's limit the max value of dctcp_shift_g by param_set_uint_minmax(). With this patch: # echo 10 > /sys/module/tcp_dctcp/parameters/dctcp_shift_g # cat /sys/module/tcp_dctcp/parameters/dctcp_shift_g 10 # echo 11 > /sys/module/tcp_dctcp/parameters/dctcp_shift_g -bash: echo: write error: Invalid argument [0]: UBSAN: shift-out-of-bounds in net/ipv4/tcp_dctcp.c:143:12 shift exponent 100 is too large for 32-bit type 'u32' (aka 'unsigned int') CPU: 0 PID: 8083 Comm: syz-executor345 Not tainted 6.9.0-05151-g1b294a1f3561 #2 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x201/0x300 lib/dump_stack.c:114 ubsan_epilogue lib/ubsan.c:231 [inline] __ubsan_handle_shift_o

osv:CVE-2024-37356

Kernel

Fixed versions: 4.19.316, 5.4.278, 5.10.219, 5.15.161, 6.1.93, 6.6.33, 6.9.4

Complete source record
{
  "id": "fb7caffd563332b2d87e39cebe0a345c31794745e941993d09715812bc613635",
  "url": "https://osv.dev/vulnerability/CVE-2024-37356",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "tcp: Fix shift-out-of-bounds in dctcp_update_alpha().",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: tcp: Fix shift-out-of-bounds in dctcp_update_alpha(). In dctcp_update_alpha(), we use a module parameter dctcp_shift_g as follows: alpha -= min_not_zero(alpha, alpha >> dctcp_shift_g); ... delivered_ce <<= (10 - dctcp_shift_g); It seems syzkaller started fuzzing module parameters and triggered shift-out-of-bounds [0] by setting 100 to dctcp_shift_g: memcpy((void*)0x20000080, \"/sys/module/tcp_dctcp/parameters/dctcp_shift_g\\000\", 47); res = syscall(__NR_openat, /*fd=*/0xffffffffffffff9cul, /*file=*/0x20000080ul, /*flags=*/2ul, /*mode=*/0ul); memcpy((void*)0x20000000, \"100\\000\", 4); syscall(__NR_write, /*fd=*/r[0], /*val=*/0x20000000ul, /*len=*/4ul); Let's limit the max value of dctcp_shift_g by param_set_uint_minmax(). With this patch: # echo 10 > /sys/module/tcp_dctcp/parameters/dctcp_shift_g # cat /sys/module/tcp_dctcp/parameters/dctcp_shift_g 10 # echo 11 > /sys/module/tcp_dctcp/parameters/dctcp_shift_g -bash: echo: write error: Invalid argument [0]: UBSAN: shift-out-of-bounds in net/ipv4/tcp_dctcp.c:143:12 shift exponent 100 is too large for 32-bit type 'u32' (aka 'unsigned int') CPU: 0 PID: 8083 Comm: syz-executor345 Not tainted 6.9.0-05151-g1b294a1f3561 #2 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x201/0x300 lib/dump_stack.c:114 ubsan_epilogue lib/ubsan.c:231 [inline] __ubsan_handle_shift_o",
    "evidence": "osv:CVE-2024-37356",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "4.19.316",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.4.278",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.10.219",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.15.161",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.1.93",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.6.33",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.9.4",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2024-37356",
      "aliases": [
        "CVE-2024-37356"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "e3118e8359bb7c59555aca60c725106e6d78c5ce"
                },
                {
                  "fixed": "06d0fe049b51b0a92a70df8333fd85c4ba3eb2c6"
                },
                {
                  "fixed": "6aacaa80d962f4916ccf90e2080306cec6c90fcf"
                },
                {
                  "fixed": "e9b2f60636d18dfd0dd4965b3316f88dfd6a2b31"
                },
                {
                  "fixed": "8602150286a2a860a1dc55cbd04f99316f19b40a"
                },
                {
                  "fixed": "e65d13ec00a738fa7661925fd5929ab3c765d4be"
                },
                {
                  "fixed": "02261d3f9dc7d1d7be7d778f839e3404ab99034c"
                },
                {
                  "fixed": "237340dee373b97833a491d2e99fcf1d4a9adafd"
                },
                {
                  "fixed": "3ebc46ca8675de6378e3f8f40768e180bb8afa66"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-37356.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "3.18.0"
                },
                {
                  "fixed": "4.19.316"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "4.20.0"
                },
                {
                  "fixed": "5.4.278"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.5.0"
                },
                {
                  "fixed": "5.10.219"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.11.0"
                },
                {
                  "fixed": "5.15.161"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.16.0"
                },
                {
                  "fixed": "6.1.93"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.2.0"
                },
                {
                  "fixed": "6.6.33"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.7.0"
                },
                {
                  "fixed": "6.9.4"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-37356.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:28.879810194Z",
      "provider": "osv",
      "references": [
        "https://cert-portal.siemens.com/productcert/html/ssa-265688.html",
        "https://cert-portal.siemens.com/productcert/html/ssa-398330.html",
        "https://cert-portal.siemens.com/productcert/html/ssa-613116.html",
        "https://git.kernel.org/stable/c/02261d3f9dc7d1d7be7d778f839e3404ab99034c",
        "https://git.kernel.org/stable/c/06d0fe049b51b0a92a70df8333fd85c4ba3eb2c6",
        "https://git.kernel.org/stable/c/237340dee373b97833a491d2e99fcf1d4a9adafd",
        "https://git.kernel.org/stable/c/3ebc46ca8675de6378e3f8f40768e180bb8afa66",
        "https://git.kernel.org/stable/c/6aacaa80d962f4916ccf90e2080306cec6c90fcf",
        "https://git.kernel.org/stable/c/8602150286a2a860a1dc55cbd04f99316f19b40a",
        "https://git.kernel.org/stable/c/e65d13ec00a738fa7661925fd5929ab3c765d4be",
        "https://git.kernel.org/stable/c/e9b2f60636d18dfd0dd4965b3316f88dfd6a2b31",
        "https://lists.debian.org/debian-lts-announce/2024/06/msg00020.html",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/37xxx/CVE-2024-37356.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2024-37356",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/37xxx/CVE-2024-37356.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-37356",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 495559,
  "published_at": "2024-06-21T10:18:11.642+00:00"
}