CVE-2024-27036
Vulnerability from cvelistv5
Published
2024-05-01 12:53
Modified
2024-11-05 09:20
Severity ?
Summary
cifs: Fix writeback data corruption
Impacted products
LinuxLinux
LinuxLinux
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2024-27036",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-05-28T16:19:34.397708Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-06-04T17:47:15.864Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      },
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-02T00:21:05.930Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/e45deec35bf7f1f4f992a707b2d04a8c162f2240"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/65f2ced695982ccd516196d0a9447d85dbe2eed5"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/844b4e132f57f1333dc79feaa035075a096762e4"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/f3dc1bdb6b0b0693562c7c54a6c28bafa608ba3c"
          }
        ],
        "title": "CVE Program Container"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/smb/client/file.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "e45deec35bf7",
              "status": "affected",
              "version": "d08089f649a0",
              "versionType": "git"
            },
            {
              "lessThan": "65f2ced69598",
              "status": "affected",
              "version": "d08089f649a0",
              "versionType": "git"
            },
            {
              "lessThan": "844b4e132f57",
              "status": "affected",
              "version": "d08089f649a0",
              "versionType": "git"
            },
            {
              "lessThan": "f3dc1bdb6b0b",
              "status": "affected",
              "version": "d08089f649a0",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/smb/client/file.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.3"
            },
            {
              "lessThan": "6.3",
              "status": "unaffected",
              "version": "0",
              "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"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ncifs: Fix writeback data corruption\n\ncifs writeback doesn\u0027t correctly handle the case where\ncifs_extend_writeback() hits a point where it is considering an additional\nfolio, but this would overrun the wsize - at which point it drops out of\nthe xarray scanning loop and calls xas_pause().  The problem is that\nxas_pause() advances the loop counter - thereby skipping that page.\n\nWhat needs to happen is for xas_reset() to be called any time we decide we\ndon\u0027t want to process the page we\u0027re looking at, but rather send the\nrequest we are building and start a new one.\n\nFix this by copying and adapting the netfslib writepages code as a\ntemporary measure, with cifs writeback intending to be offloaded to\nnetfslib in the near future.\n\nThis also fixes the issue with the use of filemap_get_folios_tag() causing\nretry of a bunch of pages which the extender already dealt with.\n\nThis can be tested by creating, say, a 64K file somewhere not on cifs\n(otherwise copy-offload may get underfoot), mounting a cifs share with a\nwsize of 64000, copying the file to it and then comparing the original file\nand the copy:\n\n        dd if=/dev/urandom of=/tmp/64K bs=64k count=1\n        mount //192.168.6.1/test /mnt -o user=...,pass=...,wsize=64000\n        cp /tmp/64K /mnt/64K\n        cmp /tmp/64K /mnt/64K\n\nWithout the fix, the cmp fails at position 64000 (or shortly thereafter)."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2024-11-05T09:20:24.211Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/e45deec35bf7f1f4f992a707b2d04a8c162f2240"
        },
        {
          "url": "https://git.kernel.org/stable/c/65f2ced695982ccd516196d0a9447d85dbe2eed5"
        },
        {
          "url": "https://git.kernel.org/stable/c/844b4e132f57f1333dc79feaa035075a096762e4"
        },
        {
          "url": "https://git.kernel.org/stable/c/f3dc1bdb6b0b0693562c7c54a6c28bafa608ba3c"
        }
      ],
      "title": "cifs: Fix writeback data corruption",
      "x_generator": {
        "engine": "bippy-9e1c9544281a"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2024-27036",
    "datePublished": "2024-05-01T12:53:46.721Z",
    "dateReserved": "2024-02-19T14:20:24.211Z",
    "dateUpdated": "2024-11-05T09:20:24.211Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2024-27036\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-05-01T13:15:49.407\",\"lastModified\":\"2024-05-01T19:50:25.633\",\"vulnStatus\":\"Awaiting Analysis\",\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\ncifs: Fix writeback data corruption\\n\\ncifs writeback doesn\u0027t correctly handle the case where\\ncifs_extend_writeback() hits a point where it is considering an additional\\nfolio, but this would overrun the wsize - at which point it drops out of\\nthe xarray scanning loop and calls xas_pause().  The problem is that\\nxas_pause() advances the loop counter - thereby skipping that page.\\n\\nWhat needs to happen is for xas_reset() to be called any time we decide we\\ndon\u0027t want to process the page we\u0027re looking at, but rather send the\\nrequest we are building and start a new one.\\n\\nFix this by copying and adapting the netfslib writepages code as a\\ntemporary measure, with cifs writeback intending to be offloaded to\\nnetfslib in the near future.\\n\\nThis also fixes the issue with the use of filemap_get_folios_tag() causing\\nretry of a bunch of pages which the extender already dealt with.\\n\\nThis can be tested by creating, say, a 64K file somewhere not on cifs\\n(otherwise copy-offload may get underfoot), mounting a cifs share with a\\nwsize of 64000, copying the file to it and then comparing the original file\\nand the copy:\\n\\n        dd if=/dev/urandom of=/tmp/64K bs=64k count=1\\n        mount //192.168.6.1/test /mnt -o user=...,pass=...,wsize=64000\\n        cp /tmp/64K /mnt/64K\\n        cmp /tmp/64K /mnt/64K\\n\\nWithout the fix, the cmp fails at position 64000 (or shortly thereafter).\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se resolvi\u00f3 la siguiente vulnerabilidad: cifs: corrige la corrupci\u00f3n de datos de reescritura cifs writeback no maneja correctamente el caso en el que cifs_extend_writeback() llega a un punto en el que est\u00e1 considerando una publicaci\u00f3n adicional, pero esto sobrepasar\u00eda el tama\u00f1o de wsize - en momento en el que sale del ciclo de escaneo de xarray y llama a xas_pause(). El problema es que xas_pause() avanza el contador de bucle, omitiendo as\u00ed esa p\u00e1gina. Lo que debe suceder es que se llame a xas_reset() cada vez que decidamos que no queremos procesar la p\u00e1gina que estamos viendo, sino enviar la solicitud que estamos creando y comenzar una nueva. Solucione este problema copiando y adaptando el c\u00f3digo de escritura de netfslib como medida temporal, y la escritura diferida de cifs se descargar\u00e1 a netfslib en un futuro pr\u00f3ximo. Esto tambi\u00e9n soluciona el problema con el uso de filemap_get_folios_tag() que provocaba un reintento de un grupo de p\u00e1ginas que el extensor ya hab\u00eda tratado. Esto se puede probar creando, por ejemplo, un archivo de 64 K en alg\u00fan lugar que no est\u00e9 en cif (de lo contrario, la descarga de copia podr\u00eda complicarse), montando un recurso compartido cif con un tama\u00f1o de 64000, copiando el archivo en \u00e9l y luego comparando el archivo original y la copia. : dd if=/dev/urandom of=/tmp/64K bs=64k count=1 mount //192.168.6.1/test /mnt -o user=...,pass=...,wsize=64000 cp /tmp /64K /mnt/64K cmp /tmp/64K /mnt/64K Sin la correcci\u00f3n, el cmp falla en la posici\u00f3n 64000 (o poco despu\u00e9s).\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/65f2ced695982ccd516196d0a9447d85dbe2eed5\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/844b4e132f57f1333dc79feaa035075a096762e4\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/e45deec35bf7f1f4f992a707b2d04a8c162f2240\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/f3dc1bdb6b0b0693562c7c54a6c28bafa608ba3c\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading...

Loading...

Loading...
  • 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.