cve-2022-48827
Vulnerability from cvelistv5
Published
2024-07-16 11:44
Modified
2024-12-19 08:08
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: NFSD: Fix the behavior of READ near OFFSET_MAX Dan Aloni reports: > Due to commit 8cfb9015280d ("NFS: Always provide aligned buffers to > the RPC read layers") on the client, a read of 0xfff is aligned up > to server rsize of 0x1000. > > As a result, in a test where the server has a file of size > 0x7fffffffffffffff, and the client tries to read from the offset > 0x7ffffffffffff000, the read causes loff_t overflow in the server > and it returns an NFS code of EINVAL to the client. The client as > a result indefinitely retries the request. The Linux NFS client does not handle NFS?ERR_INVAL, even though all NFS specifications permit servers to return that status code for a READ. Instead of NFS?ERR_INVAL, have out-of-range READ requests succeed and return a short result. Set the EOF flag in the result to prevent the client from retrying the READ request. This behavior appears to be consistent with Solaris NFS servers. Note that NFSv3 and NFSv4 use u64 offset values on the wire. These must be converted to loff_t internally before use -- an implicit type cast is not adequate for this purpose. Otherwise VFS checks against sb->s_maxbytes do not work properly.
Impacted products
Vendor Product Version
Linux Linux
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-03T15:25:01.549Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/1726a39b0879acfb490b22dca643f26f4f907da9"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/c6eff5c4277146a78b4fb8c9b668dd64542c41b0"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/44502aca8e02ab32d6b0eb52e006a5ec9402719b"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/0cb4d23ae08c48f6bf3c29a8e5c4a74b8388b960"
          }
        ],
        "title": "CVE Program Container"
      },
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2022-48827",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-09-10T16:57:40.257913Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-09-11T17:34:11.464Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/nfsd/nfs3proc.c",
            "fs/nfsd/nfs4proc.c",
            "fs/nfsd/nfs4xdr.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "1726a39b0879acfb490b22dca643f26f4f907da9",
              "status": "affected",
              "version": "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2",
              "versionType": "git"
            },
            {
              "lessThan": "c6eff5c4277146a78b4fb8c9b668dd64542c41b0",
              "status": "affected",
              "version": "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2",
              "versionType": "git"
            },
            {
              "lessThan": "44502aca8e02ab32d6b0eb52e006a5ec9402719b",
              "status": "affected",
              "version": "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2",
              "versionType": "git"
            },
            {
              "lessThan": "0cb4d23ae08c48f6bf3c29a8e5c4a74b8388b960",
              "status": "affected",
              "version": "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/nfsd/nfs3proc.c",
            "fs/nfsd/nfs4proc.c",
            "fs/nfsd/nfs4xdr.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.220",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.24",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.16.*",
              "status": "unaffected",
              "version": "5.16.10",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "5.17",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nNFSD: Fix the behavior of READ near OFFSET_MAX\n\nDan Aloni reports:\n\u003e Due to commit 8cfb9015280d (\"NFS: Always provide aligned buffers to\n\u003e the RPC read layers\") on the client, a read of 0xfff is aligned up\n\u003e to server rsize of 0x1000.\n\u003e\n\u003e As a result, in a test where the server has a file of size\n\u003e 0x7fffffffffffffff, and the client tries to read from the offset\n\u003e 0x7ffffffffffff000, the read causes loff_t overflow in the server\n\u003e and it returns an NFS code of EINVAL to the client. The client as\n\u003e a result indefinitely retries the request.\n\nThe Linux NFS client does not handle NFS?ERR_INVAL, even though all\nNFS specifications permit servers to return that status code for a\nREAD.\n\nInstead of NFS?ERR_INVAL, have out-of-range READ requests succeed\nand return a short result. Set the EOF flag in the result to prevent\nthe client from retrying the READ request. This behavior appears to\nbe consistent with Solaris NFS servers.\n\nNote that NFSv3 and NFSv4 use u64 offset values on the wire. These\nmust be converted to loff_t internally before use -- an implicit\ntype cast is not adequate for this purpose. Otherwise VFS checks\nagainst sb-\u003es_maxbytes do not work properly."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2024-12-19T08:08:29.648Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/1726a39b0879acfb490b22dca643f26f4f907da9"
        },
        {
          "url": "https://git.kernel.org/stable/c/c6eff5c4277146a78b4fb8c9b668dd64542c41b0"
        },
        {
          "url": "https://git.kernel.org/stable/c/44502aca8e02ab32d6b0eb52e006a5ec9402719b"
        },
        {
          "url": "https://git.kernel.org/stable/c/0cb4d23ae08c48f6bf3c29a8e5c4a74b8388b960"
        }
      ],
      "title": "NFSD: Fix the behavior of READ near OFFSET_MAX",
      "x_generator": {
        "engine": "bippy-5f407fcff5a0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2022-48827",
    "datePublished": "2024-07-16T11:44:12.019Z",
    "dateReserved": "2024-07-16T11:38:08.903Z",
    "dateUpdated": "2024-12-19T08:08:29.648Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2022-48827\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-07-16T12:15:06.420\",\"lastModified\":\"2024-11-21T07:34:09.767\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nNFSD: Fix the behavior of READ near OFFSET_MAX\\n\\nDan Aloni reports:\\n\u003e Due to commit 8cfb9015280d (\\\"NFS: Always provide aligned buffers to\\n\u003e the RPC read layers\\\") on the client, a read of 0xfff is aligned up\\n\u003e to server rsize of 0x1000.\\n\u003e\\n\u003e As a result, in a test where the server has a file of size\\n\u003e 0x7fffffffffffffff, and the client tries to read from the offset\\n\u003e 0x7ffffffffffff000, the read causes loff_t overflow in the server\\n\u003e and it returns an NFS code of EINVAL to the client. The client as\\n\u003e a result indefinitely retries the request.\\n\\nThe Linux NFS client does not handle NFS?ERR_INVAL, even though all\\nNFS specifications permit servers to return that status code for a\\nREAD.\\n\\nInstead of NFS?ERR_INVAL, have out-of-range READ requests succeed\\nand return a short result. Set the EOF flag in the result to prevent\\nthe client from retrying the READ request. This behavior appears to\\nbe consistent with Solaris NFS servers.\\n\\nNote that NFSv3 and NFSv4 use u64 offset values on the wire. These\\nmust be converted to loff_t internally before use -- an implicit\\ntype cast is not adequate for this purpose. Otherwise VFS checks\\nagainst sb-\u003es_maxbytes do not work properly.\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: NFSD: corrige el comportamiento de READ cerca de OFFSET_MAX Dan Aloni informa: \u0026gt; Debido a El commit 8cfb9015280d (\\\"NFS: siempre proporcione buffers alineados a \u0026gt; las capas de lectura RPC\\\") en el cliente, una lectura de 0xfff est\u00e1 alineada con el tama\u00f1o del servidor de 0x1000. \u0026gt; \u0026gt; Como resultado, en una prueba donde el servidor tiene un archivo de tama\u00f1o \u0026gt; 0x7ffffffffffffffff, y el cliente intenta leer desde el desplazamiento \u0026gt; 0x7ffffffffffffff000, la lectura causa que loff_t se desborde en el servidor \u0026gt; y devuelve un c\u00f3digo NFS de EINVAL a el cliente. Como resultado, el cliente reintenta indefinidamente la solicitud. El cliente NFS de Linux no maneja NFS?ERR_INVAL, aunque todas las especificaciones de NFS permiten a los servidores devolver ese c\u00f3digo de estado para una READ. En lugar de NFS?ERR_INVAL, haga que las solicitudes READ fuera de rango se realicen correctamente y devuelvan un resultado breve. Establezca el indicador EOF en el resultado para evitar que el cliente vuelva a intentar la solicitud READ. Este comportamiento parece ser coherente con los servidores Solaris NFS. Tenga en cuenta que NFSv3 y NFSv4 utilizan valores de compensaci\u00f3n u64 en el cable. Estos deben convertirse a loff_t internamente antes de su uso; una conversi\u00f3n de tipo impl\u00edcita no es adecuada para este prop\u00f3sito. De lo contrario, las comprobaciones de VFS con sb-\u0026gt;s_maxbytes no funcionan correctamente.\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/0cb4d23ae08c48f6bf3c29a8e5c4a74b8388b960\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/1726a39b0879acfb490b22dca643f26f4f907da9\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/44502aca8e02ab32d6b0eb52e006a5ec9402719b\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/c6eff5c4277146a78b4fb8c9b668dd64542c41b0\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/0cb4d23ae08c48f6bf3c29a8e5c4a74b8388b960\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://git.kernel.org/stable/c/1726a39b0879acfb490b22dca643f26f4f907da9\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://git.kernel.org/stable/c/44502aca8e02ab32d6b0eb52e006a5ec9402719b\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://git.kernel.org/stable/c/c6eff5c4277146a78b4fb8c9b668dd64542c41b0\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"}]}}"
  }
}


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