{"id":"CVE-2024-56627","state":"PUBLISHED","title":"ksmbd: fix Out-of-Bounds Read in ksmbd_vfs_stream_read","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: fix Out-of-Bounds Read in ksmbd_vfs_stream_read\n\nAn offset from client could be a negative value, It could lead\nto an out-of-bounds read from the stream_buf.\nNote that this issue is coming when setting\n'vfs objects = streams_xattr parameter' in ksmbd.conf.","publishedAt":"2024-12-27T14:51:29.854Z","updatedAt":"2026-08-05T11:45:32.397Z","severity":{"score":8.1,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"6bd1bf0e8c42f10a9a9679a4c103a9032d30594d","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"de4d790dcf53be41736239d7ee63849a16ff5d10","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"27de4295522e9a33e4a3fc72f7b8193df9eebe41","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"81eed631935f2c52cdaf6691c6d48e0b06e8ad73","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"fc342cf86e2dc4d2edb0fc2ff5e28b6c7845adb9","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/server/smb2pdu.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.15","versionType":"semver"},{"version":"5.15.176","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.120","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.66","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.5","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.13","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/server/smb2pdu.c"]}],"references":["https://git.kernel.org/stable/c/6bd1bf0e8c42f10a9a9679a4c103a9032d30594d","https://git.kernel.org/stable/c/de4d790dcf53be41736239d7ee63849a16ff5d10","https://git.kernel.org/stable/c/27de4295522e9a33e4a3fc72f7b8193df9eebe41","https://git.kernel.org/stable/c/81eed631935f2c52cdaf6691c6d48e0b06e8ad73","https://git.kernel.org/stable/c/fc342cf86e2dc4d2edb0fc2ff5e28b6c7845adb9","https://lists.debian.org/debian-lts-announce/2025/03/msg00001.html"],"weaknesses":["CWE-125"],"ingestedAt":"2026-10-29T20:08:12.933Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/56xxx/CVE-2024-56627.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-56627","state":"PUBLISHED","datePublished":"2024-12-27T14:51:29.854Z","dateUpdated":"2026-08-05T11:45:32.397Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-12-27T14:03:06.018Z"},"containers":{"cna":{"title":"ksmbd: fix Out-of-Bounds Read in ksmbd_vfs_stream_read","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: fix Out-of-Bounds Read in ksmbd_vfs_stream_read\n\nAn offset from client could be a negative value, It could lead\nto an out-of-bounds read from the stream_buf.\nNote that this issue is coming when setting\n'vfs objects = streams_xattr parameter' in ksmbd.conf."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"6bd1bf0e8c42f10a9a9679a4c103a9032d30594d","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"de4d790dcf53be41736239d7ee63849a16ff5d10","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"27de4295522e9a33e4a3fc72f7b8193df9eebe41","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"81eed631935f2c52cdaf6691c6d48e0b06e8ad73","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"fc342cf86e2dc4d2edb0fc2ff5e28b6c7845adb9","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/server/smb2pdu.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.15","versionType":"semver"},{"version":"5.15.176","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.120","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.66","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.5","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.13","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/server/smb2pdu.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/6bd1bf0e8c42f10a9a9679a4c103a9032d30594d"},{"url":"https://git.kernel.org/stable/c/de4d790dcf53be41736239d7ee63849a16ff5d10"},{"url":"https://git.kernel.org/stable/c/27de4295522e9a33e4a3fc72f7b8193df9eebe41"},{"url":"https://git.kernel.org/stable/c/81eed631935f2c52cdaf6691c6d48e0b06e8ad73"},{"url":"https://git.kernel.org/stable/c/fc342cf86e2dc4d2edb0fc2ff5e28b6c7845adb9"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H","baseScore":8.1,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:N - ksmbd is the in-kernel SMB server listening on TCP/445; the malicious `Offset` field arrives in an SMB2 READ request from a remote peer over the network. No local access to the target is needed.\nAC:L - The attacker fully and deterministically controls both the negative offset and the read length, and creates all preconditions itself (open `file:stream`, write one byte, then read at a negative offset); no race, no memory-layout luck, and no condition outside the attacker's control is required.\nPR:L - `smb2_check_user_session()` requires an established SMB2 session and tree connect before SMB2_READ is dispatched, so the attacker needs credentials for the share (or a guest-ok share), i.e. the privileges of an ordinary SMB user.\nUI:N - The entire sequence (CREATE with a stream name, WRITE, READ with negative offset) is driven by the attacker's own SMB connection; no administrator or user on the target has to do anything.\nS:U - The out-of-bounds read and its disclosure occur wholly within the kernel's security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - The attacker-controlled 64-bit negative displacement turns `memcpy(buf, &stream_buf[*pos], count)` into an effectively arbitrary kernel-memory read of up to 4 MB per request, and the bytes are returned directly to the remote client in the READ response — disclosing kernel pointers, credentials, keys, and other users' cached file data, repeatably.\nI:N - The defect is purely a read; the destination `aux_payload_buf` is `kvzalloc(length)` with `count <= length`, so no kernel memory is written or corrupted by this bug.\nA:H - A large negative offset makes the kernel `memcpy` from an unmapped or invalid address, producing an unhandled kernel page fault/oops that kills the ksmbd worker thread and panics the box on `panic_on_oops` configurations; it can be retriggered at will."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:45:32.397Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"5.15.176"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.1.120"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.6.66"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.12.5"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.13"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":7.1,"attackVector":"LOCAL","baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H","integrityImpact":"NONE","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"HIGH","privilegesRequired":"LOW","confidentialityImpact":"HIGH"}},{"other":{"type":"ssvc","content":{"id":"CVE-2024-56627","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2025-10-01T20:00:48.902752Z"}}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-125","lang":"en","type":"CWE","description":"CWE-125 Out-of-bounds Read"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2025-10-01T20:07:12.432Z"}},{"title":"CVE Program Container","references":[{"url":"https://lists.debian.org/debian-lts-announce/2025/03/msg00001.html"}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2025-11-03T20:51:16.745Z"}}]}}}