{"id":"CVE-2026-31437","aliases":["CVE-2026-31437"],"related":[],"kind":"vulnerability","state":"published","title":"netfs: Fix NULL pointer dereference in netfs_unbuffered_write() on retry","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nnetfs: Fix NULL pointer dereference in netfs_unbuffered_write() on retry\n\nWhen a write subrequest is marked NETFS_SREQ_NEED_RETRY, the retry path\nin netfs_unbuffered_write() unconditionally calls stream->prepare_write()\nwithout checking if it is NULL.\n\nFilesystems such as 9P do not set the prepare_write operation, so\nstream->prepare_write remains NULL. When get_user_pages() fails with\n-EFAULT and the subrequest is flagged for retry, this results in a NULL\npointer dereference at fs/netfs/direct_write.c:189.\n\nFix this by mirroring the pattern already used in write_retry.c: if\nstream->prepare_write is NULL, skip renegotiation and directly reissue\nthe subrequest via netfs_reissue_write(), which handles iterator reset,\nIN_PROGRESS flag, stats update and reissue internally.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nnetfs: Fix NULL pointer dereference in netfs_unbuffered_write() on retry\n\nWhen a write subrequest is marked NETFS_SREQ_NEED_RETRY, the retry path\nin netfs_unbuffered_write() unconditionally calls stream->prepare_write()\nwithout checking if it is NULL.\n\nFilesystems such as 9P do not set the prepare_write operation, so\nstream->prepare_write remains NULL. When get_user_pages() fails with\n-EFAULT and the subrequest is flagged for retry, this results in a NULL\npointer dereference at fs/netfs/direct_write.c:189.\n\nFix this by mirroring the pattern already used in write_retry.c: if\nstream->prepare_write is NULL, skip renegotiation and directly reissue\nthe subrequest via netfs_reissue_write(), which handles iterator reset,\nIN_PROGRESS flag, stats update and reissue internally.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nnetfs: Corrección de desreferencia de puntero NULL en netfs_unbuffered_write() al reintentar\n\nCuando una subsolicitud de escritura se marca como NETFS_SREQ_NEED_RETRY, la ruta de reintento en netfs_unbuffered_write() llama incondicionalmente a stream  ->  prepare_write() sin comprobar si es NULL.\n\nSistemas de archivos como 9P no establecen la operación prepare_write, por lo que stream  ->  prepare_write permanece NULL. Cuando get_user_pages() falla con -EFAULT y la subsolicitud se marca para reintento, esto resulta en una desreferencia de puntero NULL en fs/netfs/direct_write.c:189.\n\nEsto se corrige replicando el patrón ya utilizado en write_retry.c: si stream  ->  prepare_write es NULL, se omite la renegociación y se reemite directamente la subsolicitud a través de netfs_reissue_write(), que maneja internamente el reinicio del iterador, el indicador IN_PROGRESS, la actualización de estadísticas y la reemisión.","source":"nvd"}],"published":"2026-04-22T13:53:36.361Z","modified":"2026-11-11T23:10:00.263Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-476"],"affected":[{"ranges":[{"type":"git","introduced":"72d08d2839649d1c5efbe375751f4473fa4486af","fixed":"a4d1b4ba9754bac3efebd06f583a44a7af52c0ab","status":"affected"},{"type":"git","introduced":"0c29f6d63122a0168d67cb8ecde5b4cf7fe4acb0","fixed":"7a5482f5ce891decbf36f2e6fab1e9fc4a76a684","status":"affected"},{"type":"git","introduced":"a0b4c7a49137ed21279f354eb59f49ddae8dffc2","fixed":"e9075e420a1eb3b52c60f3b95893a55e77419ce8","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"6.18.17","fixed":"6.18.21","status":"affected"},{"type":"semver","introduced":"6.19.7","fixed":"6.19.11","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"6.18.17","fixed":"6.18.21"},{"status":"affected","introduced":"6.19.7","fixed":"6.19.11"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/a4d1b4ba9754bac3efebd06f583a44a7af52c0ab","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/7a5482f5ce891decbf36f2e6fab1e9fc4a76a684","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e9075e420a1eb3b52c60f3b95893a55e77419ce8","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-31437","url":"https://www.cve.org/CVERecord?id=CVE-2026-31437","licence":"CVE Terms of Use","modified":"2026-05-11T22:08:41.432Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-31437","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31437","licence":"Public domain","modified":"2026-11-11T23:10:00.263Z"}],"updatedAt":"2026-11-25T22:59:19.260Z","epss":{"score":0.00125,"percentile":0.02411,"date":"2026-12-01T12:00:22.000Z"}}