cve-2023-52881
Vulnerability from cvelistv5
Published
2024-05-29 10:15
Modified
2024-08-15 15:11
Severity
Summary
tcp: do not accept ACK of bytes we never sent
Impacted products
VendorProduct
LinuxLinux
LinuxLinux
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-02T23:18:41.169Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/69eae75ca5255e876628ac5cee9eaab31f644b57"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/458f07ffeccd17f99942311e09ef574ddf4a414a"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/7ffff0cc929fdfc62a74b384c4903d6496c910f0"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/b17a886ed29f3b70b78ccf632dad03e0c69e3c1a"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/0d4e0afdd6658cd21dd5be61880411a2553fd1fc"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/008b807fe487e0b15a3a6c39add4eb477f73e440"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/2087d53a66e97a5eb5d1bf558d5bef9e5f891757"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/3d501dd326fb1c73f1b8206d4c6e1d7b15c07e27"
          }
        ],
        "title": "CVE Program Container"
      },
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2023-52881",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-06-03T16:46:40.495686Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-08-15T15:11:03.358Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "net/ipv4/tcp_input.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "69eae75ca525",
              "status": "affected",
              "version": "354e4aa391ed",
              "versionType": "git"
            },
            {
              "lessThan": "458f07ffeccd",
              "status": "affected",
              "version": "354e4aa391ed",
              "versionType": "git"
            },
            {
              "lessThan": "7ffff0cc929f",
              "status": "affected",
              "version": "354e4aa391ed",
              "versionType": "git"
            },
            {
              "lessThan": "b17a886ed29f",
              "status": "affected",
              "version": "354e4aa391ed",
              "versionType": "git"
            },
            {
              "lessThan": "0d4e0afdd665",
              "status": "affected",
              "version": "354e4aa391ed",
              "versionType": "git"
            },
            {
              "lessThan": "008b807fe487",
              "status": "affected",
              "version": "354e4aa391ed",
              "versionType": "git"
            },
            {
              "lessThan": "2087d53a66e9",
              "status": "affected",
              "version": "354e4aa391ed",
              "versionType": "git"
            },
            {
              "lessThan": "3d501dd326fb",
              "status": "affected",
              "version": "354e4aa391ed",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "net/ipv4/tcp_input.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "3.8"
            },
            {
              "lessThan": "3.8",
              "status": "unaffected",
              "version": "0",
              "versionType": "custom"
            },
            {
              "lessThanOrEqual": "4.14.*",
              "status": "unaffected",
              "version": "4.14.333",
              "versionType": "custom"
            },
            {
              "lessThanOrEqual": "4.19.*",
              "status": "unaffected",
              "version": "4.19.302",
              "versionType": "custom"
            },
            {
              "lessThanOrEqual": "5.4.*",
              "status": "unaffected",
              "version": "5.4.264",
              "versionType": "custom"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.204",
              "versionType": "custom"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.143",
              "versionType": "custom"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.68",
              "versionType": "custom"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.7",
              "versionType": "custom"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.7",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ntcp: do not accept ACK of bytes we never sent\n\nThis patch is based on a detailed report and ideas from Yepeng Pan\nand Christian Rossow.\n\nACK seq validation is currently following RFC 5961 5.2 guidelines:\n\n   The ACK value is considered acceptable only if\n   it is in the range of ((SND.UNA - MAX.SND.WND) \u003c= SEG.ACK \u003c=\n   SND.NXT).  All incoming segments whose ACK value doesn\u0027t satisfy the\n   above condition MUST be discarded and an ACK sent back.  It needs to\n   be noted that RFC 793 on page 72 (fifth check) says: \"If the ACK is a\n   duplicate (SEG.ACK \u003c SND.UNA), it can be ignored.  If the ACK\n   acknowledges something not yet sent (SEG.ACK \u003e SND.NXT) then send an\n   ACK, drop the segment, and return\".  The \"ignored\" above implies that\n   the processing of the incoming data segment continues, which means\n   the ACK value is treated as acceptable.  This mitigation makes the\n   ACK check more stringent since any ACK \u003c SND.UNA wouldn\u0027t be\n   accepted, instead only ACKs that are in the range ((SND.UNA -\n   MAX.SND.WND) \u003c= SEG.ACK \u003c= SND.NXT) get through.\n\nThis can be refined for new (and possibly spoofed) flows,\nby not accepting ACK for bytes that were never sent.\n\nThis greatly improves TCP security at a little cost.\n\nI added a Fixes: tag to make sure this patch will reach stable trees,\neven if the \u0027blamed\u0027 patch was adhering to the RFC.\n\ntp-\u003ebytes_acked was added in linux-4.2\n\nFollowing packetdrill test (courtesy of Yepeng Pan) shows\nthe issue at hand:\n\n0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3\n+0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0\n+0 bind(3, ..., ...) = 0\n+0 listen(3, 1024) = 0\n\n// ---------------- Handshake ------------------- //\n\n// when window scale is set to 14 the window size can be extended to\n// 65535 * (2^14) = 1073725440. Linux would accept an ACK packet\n// with ack number in (Server_ISN+1-1073725440. Server_ISN+1)\n// ,though this ack number acknowledges some data never\n// sent by the server.\n\n+0 \u003c S 0:0(0) win 65535 \u003cmss 1400,nop,wscale 14\u003e\n+0 \u003e S. 0:0(0) ack 1 \u003c...\u003e\n+0 \u003c . 1:1(0) ack 1 win 65535\n+0 accept(3, ..., ...) = 4\n\n// For the established connection, we send an ACK packet,\n// the ack packet uses ack number 1 - 1073725300 + 2^32,\n// where 2^32 is used to wrap around.\n// Note: we used 1073725300 instead of 1073725440 to avoid possible\n// edge cases.\n// 1 - 1073725300 + 2^32 = 3221241997\n\n// Oops, old kernels happily accept this packet.\n+0 \u003c . 1:1001(1000) ack 3221241997 win 65535\n\n// After the kernel fix the following will be replaced by a challenge ACK,\n// and prior malicious frame would be dropped.\n+0 \u003e . 1:1(0) ack 1001"
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2024-05-29T10:15:14.186Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/69eae75ca5255e876628ac5cee9eaab31f644b57"
        },
        {
          "url": "https://git.kernel.org/stable/c/458f07ffeccd17f99942311e09ef574ddf4a414a"
        },
        {
          "url": "https://git.kernel.org/stable/c/7ffff0cc929fdfc62a74b384c4903d6496c910f0"
        },
        {
          "url": "https://git.kernel.org/stable/c/b17a886ed29f3b70b78ccf632dad03e0c69e3c1a"
        },
        {
          "url": "https://git.kernel.org/stable/c/0d4e0afdd6658cd21dd5be61880411a2553fd1fc"
        },
        {
          "url": "https://git.kernel.org/stable/c/008b807fe487e0b15a3a6c39add4eb477f73e440"
        },
        {
          "url": "https://git.kernel.org/stable/c/2087d53a66e97a5eb5d1bf558d5bef9e5f891757"
        },
        {
          "url": "https://git.kernel.org/stable/c/3d501dd326fb1c73f1b8206d4c6e1d7b15c07e27"
        }
      ],
      "title": "tcp: do not accept ACK of bytes we never sent",
      "x_generator": {
        "engine": "bippy-a5840b7849dd"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2023-52881",
    "datePublished": "2024-05-29T10:15:14.186Z",
    "dateReserved": "2024-05-21T15:35:00.781Z",
    "dateUpdated": "2024-08-15T15:11:03.358Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2023-52881\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-05-29T11:16:02.110\",\"lastModified\":\"2024-05-29T13:02:09.280\",\"vulnStatus\":\"Awaiting Analysis\",\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\ntcp: do not accept ACK of bytes we never sent\\n\\nThis patch is based on a detailed report and ideas from Yepeng Pan\\nand Christian Rossow.\\n\\nACK seq validation is currently following RFC 5961 5.2 guidelines:\\n\\n   The ACK value is considered acceptable only if\\n   it is in the range of ((SND.UNA - MAX.SND.WND) \u003c= SEG.ACK \u003c=\\n   SND.NXT).  All incoming segments whose ACK value doesn\u0027t satisfy the\\n   above condition MUST be discarded and an ACK sent back.  It needs to\\n   be noted that RFC 793 on page 72 (fifth check) says: \\\"If the ACK is a\\n   duplicate (SEG.ACK \u003c SND.UNA), it can be ignored.  If the ACK\\n   acknowledges something not yet sent (SEG.ACK \u003e SND.NXT) then send an\\n   ACK, drop the segment, and return\\\".  The \\\"ignored\\\" above implies that\\n   the processing of the incoming data segment continues, which means\\n   the ACK value is treated as acceptable.  This mitigation makes the\\n   ACK check more stringent since any ACK \u003c SND.UNA wouldn\u0027t be\\n   accepted, instead only ACKs that are in the range ((SND.UNA -\\n   MAX.SND.WND) \u003c= SEG.ACK \u003c= SND.NXT) get through.\\n\\nThis can be refined for new (and possibly spoofed) flows,\\nby not accepting ACK for bytes that were never sent.\\n\\nThis greatly improves TCP security at a little cost.\\n\\nI added a Fixes: tag to make sure this patch will reach stable trees,\\neven if the \u0027blamed\u0027 patch was adhering to the RFC.\\n\\ntp-\u003ebytes_acked was added in linux-4.2\\n\\nFollowing packetdrill test (courtesy of Yepeng Pan) shows\\nthe issue at hand:\\n\\n0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3\\n+0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0\\n+0 bind(3, ..., ...) = 0\\n+0 listen(3, 1024) = 0\\n\\n// ---------------- Handshake ------------------- //\\n\\n// when window scale is set to 14 the window size can be extended to\\n// 65535 * (2^14) = 1073725440. Linux would accept an ACK packet\\n// with ack number in (Server_ISN+1-1073725440. Server_ISN+1)\\n// ,though this ack number acknowledges some data never\\n// sent by the server.\\n\\n+0 \u003c S 0:0(0) win 65535 \u003cmss 1400,nop,wscale 14\u003e\\n+0 \u003e S. 0:0(0) ack 1 \u003c...\u003e\\n+0 \u003c . 1:1(0) ack 1 win 65535\\n+0 accept(3, ..., ...) = 4\\n\\n// For the established connection, we send an ACK packet,\\n// the ack packet uses ack number 1 - 1073725300 + 2^32,\\n// where 2^32 is used to wrap around.\\n// Note: we used 1073725300 instead of 1073725440 to avoid possible\\n// edge cases.\\n// 1 - 1073725300 + 2^32 = 3221241997\\n\\n// Oops, old kernels happily accept this packet.\\n+0 \u003c . 1:1001(1000) ack 3221241997 win 65535\\n\\n// After the kernel fix the following will be replaced by a challenge ACK,\\n// and prior malicious frame would be dropped.\\n+0 \u003e . 1:1(0) ack 1001\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: tcp: no acepta ACK de bytes que nunca enviamos. Este parche se basa en un informe detallado e ideas de Yepeng Pan y Christian Rossow. La validaci\u00f3n de secuencia de ACK sigue actualmente las pautas RFC 5961 5.2: El valor de ACK se considera aceptable solo si est\u00e1 en el rango de ((SND.UNA - MAX.SND.WND) \u0026lt;= SEG.ACK \u0026lt;= SND.NXT). Todos los segmentos entrantes cuyo valor ACK no satisface la condici\u00f3n anterior DEBEN descartarse y enviarse un ACK. Es necesario tener en cuenta que RFC 793 en la p\u00e1gina 72 (quinta verificaci\u00f3n) dice: \\\"Si el ACK es un duplicado (SEG.ACK \u0026lt; SND.UNA), se puede ignorar. Si el ACK reconoce algo que a\u00fan no se ha enviado (SEG. ACK \u0026gt; SND.NXT) luego env\u00eda un ACK, descarta el segmento y regresa\\\". Lo \\\"ignorado\\\" anterior implica que el procesamiento del segmento de datos entrantes contin\u00faa, lo que significa que el valor ACK se trata como aceptable. Esta mitigaci\u00f3n hace que la verificaci\u00f3n de ACK sea m\u00e1s estricta, ya que no se aceptar\u00e1 ning\u00fan ACK \u0026lt; SND.UNA; en su lugar, solo se aceptar\u00e1n ACK que est\u00e9n en el rango ((SND.UNA - MAX.SND.WND) \u0026lt;= SEG.ACK \u0026lt;= SND. NXT) pasar. Esto se puede perfeccionar para flujos nuevos (y posiblemente falsificados) al no aceptar ACK para bytes que nunca se enviaron. Esto mejora enormemente la seguridad de TCP a un costo reducido. Agregu\u00e9 una etiqueta Correcciones: para asegurarme de que este parche llegue a \u00e1rboles estables, incluso si el parche \\\"culpado\\\" se adhiri\u00f3 al RFC. tp-\u0026gt;bytes_acked se agreg\u00f3 en Linux-4.2 La siguiente prueba de packagedrill (cortes\u00eda de Yepeng Pan) muestra el problema en cuesti\u00f3n: 0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3 +0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1 ], 4) = 0 +0 enlazar(3, ..., ...) = 0 +0 escuchar(3, 1024) = 0 // ---------------- Apret\u00f3n de manos ------------------- // // cuando la escala de la ventana se establece en 14, el tama\u00f1o de la ventana se puede ampliar a // 65535 * (2^14) = 1073725440. Linux aceptar\u00eda un paquete ACK // con un n\u00famero de reconocimiento en (Server_ISN+1-1073725440. Server_ISN+1) //, aunque este n\u00famero de reconocimiento reconoce algunos datos // nunca enviados por el servidor. +0 \u0026lt; S 0:0(0) win 65535  +0 \u0026gt; S. 0:0(0) ack 1 \u0026lt;...\u0026gt; +0 \u0026lt; . 1:1(0) ack 1 win 65535 +0 aceptar(3, ..., ...) = 4 // Para la conexi\u00f3n establecida, enviamos un paquete ACK, // el paquete de confirmaci\u00f3n utiliza el n\u00famero de confirmaci\u00f3n 1 - 1073725300 + 2^32, // donde 2^32 se usa para envolver. // Nota: utilizamos 1073725300 en lugar de 1073725440 para evitar posibles // casos extremos. // 1 - 1073725300 + 2^32 = 3221241997 // Vaya, los n\u00facleos antiguos aceptan felizmente este paquete. +0 \u0026lt;. 1:1001(1000) ACK 3221241997 win 65535 // Despu\u00e9s de la correcci\u00f3n del kernel, lo siguiente ser\u00e1 reemplazado por un ACK de desaf\u00edo, // y el marco malicioso anterior se eliminar\u00e1. +0 \u0026gt; . 1:1(0) reconocimiento 1001\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/008b807fe487e0b15a3a6c39add4eb477f73e440\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/0d4e0afdd6658cd21dd5be61880411a2553fd1fc\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/2087d53a66e97a5eb5d1bf558d5bef9e5f891757\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/3d501dd326fb1c73f1b8206d4c6e1d7b15c07e27\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/458f07ffeccd17f99942311e09ef574ddf4a414a\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/69eae75ca5255e876628ac5cee9eaab31f644b57\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/7ffff0cc929fdfc62a74b384c4903d6496c910f0\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/b17a886ed29f3b70b78ccf632dad03e0c69e3c1a\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading...

Loading...