{"id":"CVE-2024-26831","state":"PUBLISHED","title":"net/handshake: Fix handshake_req_destroy_test1","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet/handshake: Fix handshake_req_destroy_test1\n\nRecently, handshake_req_destroy_test1 started failing:\n\nExpected handshake_req_destroy_test == req, but\n    handshake_req_destroy_test == 0000000000000000\n    req == 0000000060f99b40\nnot ok 11 req_destroy works\n\nThis is because \"sock_release(sock)\" was replaced with \"fput(filp)\"\nto address a memory leak. Note that sock_release() is synchronous\nbut fput() usually delays the final close and clean-up.\n\nThe delay is not consequential in the other cases that were changed\nbut handshake_req_destroy_test1 is testing that handshake_req_cancel()\nfollowed by closing the file actually does call the ->hp_destroy\nmethod. Thus the PTR_EQ test at the end has to be sure that the\nfinal close is complete before it checks the pointer.\n\nWe cannot use a completion here because if ->hp_destroy is never\ncalled (ie, there is an API bug) then the test will hang.\n\nReported by: Guenter Roeck <linux@roeck-us.net>","publishedAt":"2024-04-17T09:43:54.270Z","updatedAt":"2026-05-23T15:38:43.411Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"4a0f07d71b0483cc08c03cefa7c85749e187c214","status":"affected","lessThan":"d74226e03df1bf19848f18344401f254345af912","versionType":"git"},{"version":"4a0f07d71b0483cc08c03cefa7c85749e187c214","status":"affected","lessThan":"7f97805b8df6e33850e225e6bd3ebd9e246920af","versionType":"git"},{"version":"4a0f07d71b0483cc08c03cefa7c85749e187c214","status":"affected","lessThan":"4e1d71cabb19ec2586827adfc60d68689c68c194","versionType":"git"},{"version":"1751e44980466e3ebc246d22d3ebd422197704b6","status":"affected","versionType":"git"},{"version":"6.5.6","status":"affected","lessThan":"6.6","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/handshake/handshake-test.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.6","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.6","versionType":"semver"},{"version":"6.6.18","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.7.6","status":"unaffected","lessThanOrEqual":"6.7.*","versionType":"semver"},{"version":"6.8","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/handshake/handshake-test.c"]}],"references":["https://git.kernel.org/stable/c/d74226e03df1bf19848f18344401f254345af912","https://git.kernel.org/stable/c/7f97805b8df6e33850e225e6bd3ebd9e246920af","https://git.kernel.org/stable/c/4e1d71cabb19ec2586827adfc60d68689c68c194"],"weaknesses":[],"ingestedAt":"2026-10-29T20:07:10.607Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/26xxx/CVE-2024-26831.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-26831","state":"PUBLISHED","datePublished":"2024-04-17T09:43:54.270Z","dateUpdated":"2026-05-23T15:38:43.411Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-02-19T14:20:24.181Z"},"containers":{"cna":{"title":"net/handshake: Fix handshake_req_destroy_test1","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet/handshake: Fix handshake_req_destroy_test1\n\nRecently, handshake_req_destroy_test1 started failing:\n\nExpected handshake_req_destroy_test == req, but\n    handshake_req_destroy_test == 0000000000000000\n    req == 0000000060f99b40\nnot ok 11 req_destroy works\n\nThis is because \"sock_release(sock)\" was replaced with \"fput(filp)\"\nto address a memory leak. Note that sock_release() is synchronous\nbut fput() usually delays the final close and clean-up.\n\nThe delay is not consequential in the other cases that were changed\nbut handshake_req_destroy_test1 is testing that handshake_req_cancel()\nfollowed by closing the file actually does call the ->hp_destroy\nmethod. Thus the PTR_EQ test at the end has to be sure that the\nfinal close is complete before it checks the pointer.\n\nWe cannot use a completion here because if ->hp_destroy is never\ncalled (ie, there is an API bug) then the test will hang.\n\nReported by: Guenter Roeck <linux@roeck-us.net>"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"4a0f07d71b0483cc08c03cefa7c85749e187c214","status":"affected","lessThan":"d74226e03df1bf19848f18344401f254345af912","versionType":"git"},{"version":"4a0f07d71b0483cc08c03cefa7c85749e187c214","status":"affected","lessThan":"7f97805b8df6e33850e225e6bd3ebd9e246920af","versionType":"git"},{"version":"4a0f07d71b0483cc08c03cefa7c85749e187c214","status":"affected","lessThan":"4e1d71cabb19ec2586827adfc60d68689c68c194","versionType":"git"},{"version":"1751e44980466e3ebc246d22d3ebd422197704b6","status":"affected","versionType":"git"},{"version":"6.5.6","status":"affected","lessThan":"6.6","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/handshake/handshake-test.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.6","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.6","versionType":"semver"},{"version":"6.6.18","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.7.6","status":"unaffected","lessThanOrEqual":"6.7.*","versionType":"semver"},{"version":"6.8","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/handshake/handshake-test.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/d74226e03df1bf19848f18344401f254345af912"},{"url":"https://git.kernel.org/stable/c/7f97805b8df6e33850e225e6bd3ebd9e246920af"},{"url":"https://git.kernel.org/stable/c/4e1d71cabb19ec2586827adfc60d68689c68c194"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-23T15:38:43.411Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6","versionEndExcluding":"6.6.18"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6","versionEndExcluding":"6.7.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6","versionEndExcluding":"6.8"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.5.6"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/d74226e03df1bf19848f18344401f254345af912","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/7f97805b8df6e33850e225e6bd3ebd9e246920af","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/4e1d71cabb19ec2586827adfc60d68689c68c194","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-02T00:14:13.646Z"}},{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2024-26831","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-09-10T15:48:57.699634Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-09-11T17:33:29.492Z"}}]}}}