{"id":"CVE-2025-40268","aliases":["CVE-2025-40268"],"related":[],"kind":"vulnerability","state":"published","title":"cifs: client: fix memory leak in smb3_fs_context_parse_param","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\ncifs: client: fix memory leak in smb3_fs_context_parse_param\n\nThe user calls fsconfig twice, but when the program exits, free() only\nfrees ctx->source for the second fsconfig, not the first.\nRegarding fc->source, there is no code in the fs context related to its\nmemory reclamation.\n\nTo fix this memory leak, release the source memory corresponding to ctx\nor fc before each parsing.\n\nsyzbot reported:\nBUG: memory leak\nunreferenced object 0xffff888128afa360 (size 96):\n  backtrace (crc 79c9c7ba):\n    kstrdup+0x3c/0x80 mm/util.c:84\n    smb3_fs_context_parse_param+0x229b/0x36c0 fs/smb/client/fs_context.c:1444\n\nBUG: memory leak\nunreferenced object 0xffff888112c7d900 (size 96):\n  backtrace (crc 79c9c7ba):\n    smb3_fs_context_fullpath+0x70/0x1b0 fs/smb/client/fs_context.c:629\n    smb3_fs_context_parse_param+0x2266/0x36c0 fs/smb/client/fs_context.c:1438","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\ncifs: client: fix memory leak in smb3_fs_context_parse_param\n\nThe user calls fsconfig twice, but when the program exits, free() only\nfrees ctx->source for the second fsconfig, not the first.\nRegarding fc->source, there is no code in the fs context related to its\nmemory reclamation.\n\nTo fix this memory leak, release the source memory corresponding to ctx\nor fc before each parsing.\n\nsyzbot reported:\nBUG: memory leak\nunreferenced object 0xffff888128afa360 (size 96):\n  backtrace (crc 79c9c7ba):\n    kstrdup+0x3c/0x80 mm/util.c:84\n    smb3_fs_context_parse_param+0x229b/0x36c0 fs/smb/client/fs_context.c:1444\n\nBUG: memory leak\nunreferenced object 0xffff888112c7d900 (size 96):\n  backtrace (crc 79c9c7ba):\n    smb3_fs_context_fullpath+0x70/0x1b0 fs/smb/client/fs_context.c:629\n    smb3_fs_context_parse_param+0x2266/0x36c0 fs/smb/client/fs_context.c:1438","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha corregido la siguiente vulnerabilidad:\n\ncifs: cliente: corregir fuga de memoria en?'smb3_fs_context_parse_param'\n\nEl usuario llama a fsconfig dos veces, pero cuando el programa finaliza,?'free()' solo libera 'ctx -> source' para el segundo?fsconfig, no para el primero. En cuanto a 'fc -> source', no existe código en el contexto de fs relacionado con la reclamación de su memoria.\n\nPara corregir esta fuga de memoria, libere la memoria?source correspondiente a?'ctx' o a?'fc' antes de cada análisis.\n\nsyzbot informó:\n'''\nBUG: fuga de memoria\nobjeto sin referencias 0xffff888128afa360 (tamaño 96):\n  backtrace (crc 79c9c7ba):\n    kstrdup+0x3c/0x80 mm/util.c:84\n    smb3_fs_context_parse_param+0x229b/0x36c0 fs/smb/client/fs_context.c:1444\n\nBUG: fuga de memoria\nobjeto sin referencias 0xffff888112c7d900 (tamaño 96):\n  backtrace (crc 79c9c7ba):\n    smb3_fs_context_fullpath+0x70/0x1b0 fs/smb/client/fs_context.c:629\n    smb3_fs_context_parse_param+0x2266/0x36c0 fs/smb/client/fs_context.c:1438\n'''","source":"nvd"}],"published":"2025-12-06T21:50:48.917Z","modified":"2026-10-30T13:18:14.560Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"af1a3d2ba9543e99d78914d8fb88b61d0531d9a1","fixed":"299bc05e1475a4aa1eb985ade8f39e68c1bba9b9","status":"affected"},{"type":"git","introduced":"af1a3d2ba9543e99d78914d8fb88b61d0531d9a1","fixed":"868fc62811d3fabcf5685e14f36377a855d5412d","status":"affected"},{"type":"git","introduced":"af1a3d2ba9543e99d78914d8fb88b61d0531d9a1","fixed":"48c17341577e25a22feb13d694374b61d974edbc","status":"affected"},{"type":"git","introduced":"af1a3d2ba9543e99d78914d8fb88b61d0531d9a1","fixed":"4515743cc7a42e1d67468402a6420c195532a6fa","status":"affected"},{"type":"git","introduced":"af1a3d2ba9543e99d78914d8fb88b61d0531d9a1","fixed":"e8c73eb7db0a498cd4b22d2819e6ab1a6f506bd6","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.11","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.11","status":"unaffected"},{"type":"semver","introduced":"6.1.191","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.117","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.59","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.17.9","lastAffected":"6.17.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.18","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/299bc05e1475a4aa1eb985ade8f39e68c1bba9b9","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/868fc62811d3fabcf5685e14f36377a855d5412d","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/48c17341577e25a22feb13d694374b61d974edbc","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/4515743cc7a42e1d67468402a6420c195532a6fa","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e8c73eb7db0a498cd4b22d2819e6ab1a6f506bd6","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-40268","url":"https://www.cve.org/CVERecord?id=CVE-2025-40268","licence":"CVE Terms of Use","modified":"2026-10-30T12:22:57.829Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-40268","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-40268","licence":"Public domain","modified":"2026-10-30T13:18:14.560Z"}],"updatedAt":"2026-11-25T22:59:08.372Z","epss":{"score":0.00208,"percentile":0.11599,"date":"2026-12-01T12:00:22.000Z"}}