CVE-2023-53667 (GCVE-0-2023-53667)
Vulnerability from cvelistv5
Published
2025-10-07 15:21
Modified
2025-10-07 15:21
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: net: cdc_ncm: Deal with too low values of dwNtbOutMaxSize Currently in cdc_ncm_check_tx_max(), if dwNtbOutMaxSize is lower than the calculated "min" value, but greater than zero, the logic sets tx_max to dwNtbOutMaxSize. This is then used to allocate a new SKB in cdc_ncm_fill_tx_frame() where all the data is handled. For small values of dwNtbOutMaxSize the memory allocated during alloc_skb(dwNtbOutMaxSize, GFP_ATOMIC) will have the same size, due to how size is aligned at alloc time: size = SKB_DATA_ALIGN(size); size += SKB_DATA_ALIGN(sizeof(struct skb_shared_info)); Thus we hit the same bug that we tried to squash with commit 2be6d4d16a084 ("net: cdc_ncm: Allow for dwNtbOutMaxSize to be unset or zero") Low values of dwNtbOutMaxSize do not cause an issue presently because at alloc_skb() time more memory (512b) is allocated than required for the SKB headers alone (320b), leaving some space (512b - 320b = 192b) for CDC data (172b). However, if more elements (for example 3 x u64 = [24b]) were added to one of the SKB header structs, say 'struct skb_shared_info', increasing its original size (320b [320b aligned]) to something larger (344b [384b aligned]), then suddenly the CDC data (172b) no longer fits in the spare SKB data area (512b - 384b = 128b). Consequently the SKB bounds checking semantics fails and panics: skbuff: skb_over_panic: text:ffffffff831f755b len:184 put:172 head:ffff88811f1c6c00 data:ffff88811f1c6c00 tail:0xb8 end:0x80 dev:<NULL> ------------[ cut here ]------------ kernel BUG at net/core/skbuff.c:113! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 57 Comm: kworker/0:2 Not tainted 5.15.106-syzkaller-00249-g19c0ed55a470 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023 Workqueue: mld mld_ifc_work RIP: 0010:skb_panic net/core/skbuff.c:113 [inline] RIP: 0010:skb_over_panic+0x14c/0x150 net/core/skbuff.c:118 [snip] Call Trace: <TASK> skb_put+0x151/0x210 net/core/skbuff.c:2047 skb_put_zero include/linux/skbuff.h:2422 [inline] cdc_ncm_ndp16 drivers/net/usb/cdc_ncm.c:1131 [inline] cdc_ncm_fill_tx_frame+0x11ab/0x3da0 drivers/net/usb/cdc_ncm.c:1308 cdc_ncm_tx_fixup+0xa3/0x100 Deal with too low values of dwNtbOutMaxSize, clamp it in the range [USB_CDC_NCM_NTB_MIN_OUT_SIZE, CDC_NCM_NTB_MAX_SIZE_TX]. We ensure enough data space is allocated to handle CDC data by making sure dwNtbOutMaxSize is not smaller than USB_CDC_NCM_NTB_MIN_OUT_SIZE.
Impacted products
Vendor Product Version
Linux Linux Version: 289507d3364f96f4b8814726917d572f71350d87
Version: 289507d3364f96f4b8814726917d572f71350d87
Version: 289507d3364f96f4b8814726917d572f71350d87
Version: 289507d3364f96f4b8814726917d572f71350d87
Version: 289507d3364f96f4b8814726917d572f71350d87
Version: 289507d3364f96f4b8814726917d572f71350d87
Version: 289507d3364f96f4b8814726917d572f71350d87
Version: 289507d3364f96f4b8814726917d572f71350d87
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/net/usb/cdc_ncm.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "2334ff0b343ba6ba7a6c0586fcc83992bbbc1776",
              "status": "affected",
              "version": "289507d3364f96f4b8814726917d572f71350d87",
              "versionType": "git"
            },
            {
              "lessThan": "bf415bfe7573596ac213b4fd1da9e62cfc9a9413",
              "status": "affected",
              "version": "289507d3364f96f4b8814726917d572f71350d87",
              "versionType": "git"
            },
            {
              "lessThan": "ff484163dfb61b58f23e4dbd007de1094427669c",
              "status": "affected",
              "version": "289507d3364f96f4b8814726917d572f71350d87",
              "versionType": "git"
            },
            {
              "lessThan": "42b78c8cc774b47023d6d16d96d54cc7015e4a07",
              "status": "affected",
              "version": "289507d3364f96f4b8814726917d572f71350d87",
              "versionType": "git"
            },
            {
              "lessThan": "9be921854e983a81a0aeeae5febcd87093086e46",
              "status": "affected",
              "version": "289507d3364f96f4b8814726917d572f71350d87",
              "versionType": "git"
            },
            {
              "lessThan": "6147745d43ff4e0d2c542e5b93e398ef0ee4db00",
              "status": "affected",
              "version": "289507d3364f96f4b8814726917d572f71350d87",
              "versionType": "git"
            },
            {
              "lessThan": "72d0240b0ee4794efc683975c213e4b384fea733",
              "status": "affected",
              "version": "289507d3364f96f4b8814726917d572f71350d87",
              "versionType": "git"
            },
            {
              "lessThan": "7e01c7f7046efc2c7c192c3619db43292b98e997",
              "status": "affected",
              "version": "289507d3364f96f4b8814726917d572f71350d87",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/net/usb/cdc_ncm.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "3.16"
            },
            {
              "lessThan": "3.16",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "4.14.*",
              "status": "unaffected",
              "version": "4.14.317",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "4.19.*",
              "status": "unaffected",
              "version": "4.19.285",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.4.*",
              "status": "unaffected",
              "version": "5.4.245",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.181",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.114",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.31",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.3.*",
              "status": "unaffected",
              "version": "6.3.5",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.4",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "4.14.317",
                  "versionStartIncluding": "3.16",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "4.19.285",
                  "versionStartIncluding": "3.16",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.4.245",
                  "versionStartIncluding": "3.16",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.10.181",
                  "versionStartIncluding": "3.16",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.15.114",
                  "versionStartIncluding": "3.16",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.31",
                  "versionStartIncluding": "3.16",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.3.5",
                  "versionStartIncluding": "3.16",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.4",
                  "versionStartIncluding": "3.16",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nnet: cdc_ncm: Deal with too low values of dwNtbOutMaxSize\n\nCurrently in cdc_ncm_check_tx_max(), if dwNtbOutMaxSize is lower than\nthe calculated \"min\" value, but greater than zero, the logic sets\ntx_max to dwNtbOutMaxSize. This is then used to allocate a new SKB in\ncdc_ncm_fill_tx_frame() where all the data is handled.\n\nFor small values of dwNtbOutMaxSize the memory allocated during\nalloc_skb(dwNtbOutMaxSize, GFP_ATOMIC) will have the same size, due to\nhow size is aligned at alloc time:\n\tsize = SKB_DATA_ALIGN(size);\n        size += SKB_DATA_ALIGN(sizeof(struct skb_shared_info));\nThus we hit the same bug that we tried to squash with\ncommit 2be6d4d16a084 (\"net: cdc_ncm: Allow for dwNtbOutMaxSize to be unset or zero\")\n\nLow values of dwNtbOutMaxSize do not cause an issue presently because at\nalloc_skb() time more memory (512b) is allocated than required for the\nSKB headers alone (320b), leaving some space (512b - 320b = 192b)\nfor CDC data (172b).\n\nHowever, if more elements (for example 3 x u64 = [24b]) were added to\none of the SKB header structs, say \u0027struct skb_shared_info\u0027,\nincreasing its original size (320b [320b aligned]) to something larger\n(344b [384b aligned]), then suddenly the CDC data (172b) no longer\nfits in the spare SKB data area (512b - 384b = 128b).\n\nConsequently the SKB bounds checking semantics fails and panics:\n\nskbuff: skb_over_panic: text:ffffffff831f755b len:184 put:172 head:ffff88811f1c6c00 data:ffff88811f1c6c00 tail:0xb8 end:0x80 dev:\u003cNULL\u003e\n------------[ cut here ]------------\nkernel BUG at net/core/skbuff.c:113!\ninvalid opcode: 0000 [#1] PREEMPT SMP KASAN\nCPU: 0 PID: 57 Comm: kworker/0:2 Not tainted 5.15.106-syzkaller-00249-g19c0ed55a470 #0\nHardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023\nWorkqueue: mld mld_ifc_work\nRIP: 0010:skb_panic net/core/skbuff.c:113 [inline]\nRIP: 0010:skb_over_panic+0x14c/0x150 net/core/skbuff.c:118\n[snip]\nCall Trace:\n \u003cTASK\u003e\n skb_put+0x151/0x210 net/core/skbuff.c:2047\n skb_put_zero include/linux/skbuff.h:2422 [inline]\n cdc_ncm_ndp16 drivers/net/usb/cdc_ncm.c:1131 [inline]\n cdc_ncm_fill_tx_frame+0x11ab/0x3da0 drivers/net/usb/cdc_ncm.c:1308\n cdc_ncm_tx_fixup+0xa3/0x100\n\nDeal with too low values of dwNtbOutMaxSize, clamp it in the range\n[USB_CDC_NCM_NTB_MIN_OUT_SIZE, CDC_NCM_NTB_MAX_SIZE_TX]. We ensure\nenough data space is allocated to handle CDC data by making sure\ndwNtbOutMaxSize is not smaller than USB_CDC_NCM_NTB_MIN_OUT_SIZE."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-10-07T15:21:25.185Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/2334ff0b343ba6ba7a6c0586fcc83992bbbc1776"
        },
        {
          "url": "https://git.kernel.org/stable/c/bf415bfe7573596ac213b4fd1da9e62cfc9a9413"
        },
        {
          "url": "https://git.kernel.org/stable/c/ff484163dfb61b58f23e4dbd007de1094427669c"
        },
        {
          "url": "https://git.kernel.org/stable/c/42b78c8cc774b47023d6d16d96d54cc7015e4a07"
        },
        {
          "url": "https://git.kernel.org/stable/c/9be921854e983a81a0aeeae5febcd87093086e46"
        },
        {
          "url": "https://git.kernel.org/stable/c/6147745d43ff4e0d2c542e5b93e398ef0ee4db00"
        },
        {
          "url": "https://git.kernel.org/stable/c/72d0240b0ee4794efc683975c213e4b384fea733"
        },
        {
          "url": "https://git.kernel.org/stable/c/7e01c7f7046efc2c7c192c3619db43292b98e997"
        }
      ],
      "title": "net: cdc_ncm: Deal with too low values of dwNtbOutMaxSize",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2023-53667",
    "datePublished": "2025-10-07T15:21:25.185Z",
    "dateReserved": "2025-10-07T15:16:59.662Z",
    "dateUpdated": "2025-10-07T15:21:25.185Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2023-53667\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-10-07T16:15:50.513\",\"lastModified\":\"2025-10-08T19:38:09.863\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nnet: cdc_ncm: Deal with too low values of dwNtbOutMaxSize\\n\\nCurrently in cdc_ncm_check_tx_max(), if dwNtbOutMaxSize is lower than\\nthe calculated \\\"min\\\" value, but greater than zero, the logic sets\\ntx_max to dwNtbOutMaxSize. This is then used to allocate a new SKB in\\ncdc_ncm_fill_tx_frame() where all the data is handled.\\n\\nFor small values of dwNtbOutMaxSize the memory allocated during\\nalloc_skb(dwNtbOutMaxSize, GFP_ATOMIC) will have the same size, due to\\nhow size is aligned at alloc time:\\n\\tsize = SKB_DATA_ALIGN(size);\\n        size += SKB_DATA_ALIGN(sizeof(struct skb_shared_info));\\nThus we hit the same bug that we tried to squash with\\ncommit 2be6d4d16a084 (\\\"net: cdc_ncm: Allow for dwNtbOutMaxSize to be unset or zero\\\")\\n\\nLow values of dwNtbOutMaxSize do not cause an issue presently because at\\nalloc_skb() time more memory (512b) is allocated than required for the\\nSKB headers alone (320b), leaving some space (512b - 320b = 192b)\\nfor CDC data (172b).\\n\\nHowever, if more elements (for example 3 x u64 = [24b]) were added to\\none of the SKB header structs, say \u0027struct skb_shared_info\u0027,\\nincreasing its original size (320b [320b aligned]) to something larger\\n(344b [384b aligned]), then suddenly the CDC data (172b) no longer\\nfits in the spare SKB data area (512b - 384b = 128b).\\n\\nConsequently the SKB bounds checking semantics fails and panics:\\n\\nskbuff: skb_over_panic: text:ffffffff831f755b len:184 put:172 head:ffff88811f1c6c00 data:ffff88811f1c6c00 tail:0xb8 end:0x80 dev:\u003cNULL\u003e\\n------------[ cut here ]------------\\nkernel BUG at net/core/skbuff.c:113!\\ninvalid opcode: 0000 [#1] PREEMPT SMP KASAN\\nCPU: 0 PID: 57 Comm: kworker/0:2 Not tainted 5.15.106-syzkaller-00249-g19c0ed55a470 #0\\nHardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023\\nWorkqueue: mld mld_ifc_work\\nRIP: 0010:skb_panic net/core/skbuff.c:113 [inline]\\nRIP: 0010:skb_over_panic+0x14c/0x150 net/core/skbuff.c:118\\n[snip]\\nCall Trace:\\n \u003cTASK\u003e\\n skb_put+0x151/0x210 net/core/skbuff.c:2047\\n skb_put_zero include/linux/skbuff.h:2422 [inline]\\n cdc_ncm_ndp16 drivers/net/usb/cdc_ncm.c:1131 [inline]\\n cdc_ncm_fill_tx_frame+0x11ab/0x3da0 drivers/net/usb/cdc_ncm.c:1308\\n cdc_ncm_tx_fixup+0xa3/0x100\\n\\nDeal with too low values of dwNtbOutMaxSize, clamp it in the range\\n[USB_CDC_NCM_NTB_MIN_OUT_SIZE, CDC_NCM_NTB_MAX_SIZE_TX]. We ensure\\nenough data space is allocated to handle CDC data by making sure\\ndwNtbOutMaxSize is not smaller than USB_CDC_NCM_NTB_MIN_OUT_SIZE.\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/2334ff0b343ba6ba7a6c0586fcc83992bbbc1776\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/42b78c8cc774b47023d6d16d96d54cc7015e4a07\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/6147745d43ff4e0d2c542e5b93e398ef0ee4db00\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/72d0240b0ee4794efc683975c213e4b384fea733\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/7e01c7f7046efc2c7c192c3619db43292b98e997\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/9be921854e983a81a0aeeae5febcd87093086e46\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/bf415bfe7573596ac213b4fd1da9e62cfc9a9413\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/ff484163dfb61b58f23e4dbd007de1094427669c\",\"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.
  • 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…