7.8
HIGH CVSS 3.1
CVE-2026-31703
writeback: Fix use after free in inode_switch_wbs_work_fn()
Description

In the Linux kernel, the following vulnerability has been resolved: writeback: Fix use after free in inode_switch_wbs_work_fn() inode_switch_wbs_work_fn() has a loop like: wb_get(new_wb); while (1) { list = llist_del_all(&new_wb->switch_wbs_ctxs); /* Nothing to do? */ if (!list) break; ... process the items ... } Now adding of items to the list looks like: wb_queue_isw() if (llist_add(&isw->list, &wb->switch_wbs_ctxs)) queue_work(isw_wq, &wb->switch_work); Because inode_switch_wbs_work_fn() loops when processing isw items, it can happen that wb->switch_work is pending while wb->switch_wbs_ctxs is empty. This is a problem because in that case wb can get freed (no isw items -> no wb reference) while the work is still pending causing use-after-free issues. We cannot just fix this by cancelling work when freeing wb because that could still trigger problematic 0 -> 1 transitions on wb refcount due to wb_get() in inode_switch_wbs_work_fn(). It could be all handled with more careful code but that seems unnecessarily complex so let's avoid that until it is proven that the looping actually brings practical benefit. Just remove the loop from inode_switch_wbs_work_fn() instead. That way when wb_queue_isw() queues work, we are guaranteed we have added the first item to wb->switch_wbs_ctxs and nobody is going to remove it (and drop the wb reference it holds) until the queued work runs.

INFO

Published Date :

May 1, 2026, 2:16 p.m.

Last Modified :

July 24, 2026, 3:17 p.m.

Remotely Exploit :

No

Source :

416baaa9-dc9f-4396-8d5f-8c081fb06d67
Affected Products

The following products are affected by CVE-2026-31703 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Linux linux_kernel
CVSS Scores
The Common Vulnerability Scoring System is a standardized framework for assessing the severity of vulnerabilities in software and systems. We collect and displays CVSS scores from various sources for each CVE.
Score Version Severity Vector Exploitability Score Impact Score Source
CVSS 3.1 HIGH 416baaa9-dc9f-4396-8d5f-8c081fb06d67
CVSS 3.1 HIGH 0b0ca135-0b70-47e7-9f44-1890c2a1c46c
Solution
Remove the loop in inode_switch_wbs_work_fn to prevent use-after-free.
  • Remove the loop from inode_switch_wbs_work_fn.
  • Ensure no items are removed before queued work runs.
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2026-31703 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2026-31703 weaknesses.

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2026-31703 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2026-31703 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67

    Jul. 24, 2026

    Action Type Old Value New Value
    Added Reference https://git.kernel.org/stable/c/19ec404b079be057b387643ba0c69bbcc5867c35
    Added Reference https://git.kernel.org/stable/c/382cf81cae89e58d22b4bdc38891cd4d0b9ba921
    Changed Affected [{'repo': 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git', 'vendor': 'Linux', 'product': 'Linux', 'versions': [{'status': 'affected', 'version': 'fabfc1fcddc5d8185722d4fde5f0968c4760b71e', 'lessThan': '156cc63691c1f20905510b1007896e090355e6c2', 'versionType': 'git'}, {'status': 'affected', 'version': 'e1b849cfa6b61f1c866a908c9e8dd9b5aaab820b', 'lessThan': '028103656b84273c73e9e271cf95c9f3421f4b8a', 'versionType': 'git'}, {'status': 'affected', 'version': 'e1b849cfa6b61f1c866a908c9e8dd9b5aaab820b', 'lessThan': '9223e5f30403a9b506d6d0bff4f2e29a2d7d46af', 'versionType': 'git'}, {'status': 'affected', 'version': 'e1b849cfa6b61f1c866a908c9e8dd9b5aaab820b', 'lessThan': '6689f01d6740cf358932b3e97ee968c6099800d9', 'versionType': 'git'}], 'programFiles': ['fs/fs-writeback.c'], 'defaultStatus': 'unaffected'}, {'repo': 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git', 'vendor': 'Linux', 'product': 'Linux', 'versions': [{'status': 'affected', 'version': '6.18'}, {'status': 'unaffected', 'version': '0', 'lessThan': '6.18', 'versionType': 'semver'}, {'status': 'unaffected', 'version': '6.18.25', 'versionType': 'semver', 'lessThanOrEqual': '6.18.*'}, {'status': 'unaffected', 'version': '7.0.2', 'versionType': 'semver', 'lessThanOrEqual': '7.0.*'}, {'status': 'unaffected', 'version': '7.1', 'versionType': 'original_commit_for_fix', 'lessThanOrEqual': '*'}], 'programFiles': ['fs/fs-writeback.c'], 'defaultStatus': 'affected'}] [{'repo': 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git', 'vendor': 'Linux', 'product': 'Linux', 'versions': [{'status': 'affected', 'version': 'd072b38a64ddbc2d58c2e525a24af24ecbfebcb7', 'lessThan': '382cf81cae89e58d22b4bdc38891cd4d0b9ba921', 'versionType': 'git'}, {'status': 'affected', 'version': 'ac7b2c21f2269d815ad0cdf0f8258d55185b805c', 'lessThan': '19ec404b079be057b387643ba0c69bbcc5867c35', 'versionType': 'git'}, {'status': 'affected', 'version': 'fabfc1fcddc5d8185722d4fde5f0968c4760b71e', 'lessThan': '156cc63691c1f20905510b1007896e090355e6c2', 'versionType': 'git'}, {'status': 'affected', 'version': 'e1b849cfa6b61f1c866a908c9e8dd9b5aaab820b', 'lessThan': '028103656b84273c73e9e271cf95c9f3421f4b8a', 'versionType': 'git'}, {'status': 'affected', 'version': 'e1b849cfa6b61f1c866a908c9e8dd9b5aaab820b', 'lessThan': '9223e5f30403a9b506d6d0bff4f2e29a2d7d46af', 'versionType': 'git'}, {'status': 'affected', 'version': 'e1b849cfa6b61f1c866a908c9e8dd9b5aaab820b', 'lessThan': '6689f01d6740cf358932b3e97ee968c6099800d9', 'versionType': 'git'}], 'programFiles': ['fs/fs-writeback.c'], 'defaultStatus': 'unaffected'}, {'repo': 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git', 'vendor': 'Linux', 'product': 'Linux', 'versions': [{'status': 'affected', 'version': '6.18'}, {'status': 'unaffected', 'version': '0', 'lessThan': '6.18', 'versionType': 'semver'}, {'status': 'unaffected', 'version': '6.18.25', 'versionType': 'semver', 'lessThanOrEqual': '6.18.*'}, {'status': 'unaffected', 'version': '7.0.2', 'versionType': 'semver', 'lessThanOrEqual': '7.0.*'}, {'status': 'unaffected', 'version': '7.1', 'versionType': 'original_commit_for_fix', 'lessThanOrEqual': '*'}], 'programFiles': ['fs/fs-writeback.c'], 'defaultStatus': 'affected'}]
  • CVE Modified by 0b0ca135-0b70-47e7-9f44-1890c2a1c46c

    Jul. 15, 2026

    Action Type Old Value New Value
    Changed Affected [{'cpes': ['cpe:/o:redhat:enterprise_linux:10'], 'vendor': 'Red Hat', 'product': 'Red Hat Enterprise Linux 10', 'defaultStatus': 'unaffected'}, {'cpes': ['cpe:/o:redhat:enterprise_linux:6'], 'vendor': 'Red Hat', 'product': 'Red Hat Enterprise Linux 6', 'defaultStatus': 'unaffected'}, {'cpes': ['cpe:/o:redhat:enterprise_linux:7'], 'vendor': 'Red Hat', 'product': 'Red Hat Enterprise Linux 7', 'defaultStatus': 'unaffected'}, {'cpes': ['cpe:/o:redhat:enterprise_linux:8'], 'vendor': 'Red Hat', 'product': 'Red Hat Enterprise Linux 8', 'defaultStatus': 'unaffected'}, {'cpes': ['cpe:/o:redhat:enterprise_linux:9'], 'vendor': 'Red Hat', 'product': 'Red Hat Enterprise Linux 9', 'defaultStatus': 'unaffected'}] [{'cpes': ['cpe:/o:redhat:enterprise_linux:10'], 'vendor': 'Red Hat', 'product': 'Red Hat Enterprise Linux 10', 'packageName': 'kernel', 'collectionURL': 'https://access.redhat.com/downloads/content/package-browser/', 'defaultStatus': 'unaffected'}, {'cpes': ['cpe:/o:redhat:enterprise_linux:6'], 'vendor': 'Red Hat', 'product': 'Red Hat Enterprise Linux 6', 'packageName': 'kernel', 'collectionURL': 'https://access.redhat.com/downloads/content/package-browser/', 'defaultStatus': 'unaffected'}, {'cpes': ['cpe:/o:redhat:enterprise_linux:7'], 'vendor': 'Red Hat', 'product': 'Red Hat Enterprise Linux 7', 'packageName': 'kernel', 'collectionURL': 'https://access.redhat.com/downloads/content/package-browser/', 'defaultStatus': 'unaffected'}, {'cpes': ['cpe:/o:redhat:enterprise_linux:7'], 'vendor': 'Red Hat', 'product': 'Red Hat Enterprise Linux 7', 'packageName': 'kernel-rt', 'collectionURL': 'https://access.redhat.com/downloads/content/package-browser/', 'defaultStatus': 'unaffected'}, {'cpes': ['cpe:/o:redhat:enterprise_linux:8'], 'vendor': 'Red Hat', 'product': 'Red Hat Enterprise Linux 8', 'packageName': 'kernel', 'collectionURL': 'https://access.redhat.com/downloads/content/package-browser/', 'defaultStatus': 'unaffected'}, {'cpes': ['cpe:/o:redhat:enterprise_linux:8'], 'vendor': 'Red Hat', 'product': 'Red Hat Enterprise Linux 8', 'packageName': 'kernel-rt', 'collectionURL': 'https://access.redhat.com/downloads/content/package-browser/', 'defaultStatus': 'unaffected'}, {'cpes': ['cpe:/o:redhat:enterprise_linux:9'], 'vendor': 'Red Hat', 'product': 'Red Hat Enterprise Linux 9', 'packageName': 'kernel', 'collectionURL': 'https://access.redhat.com/downloads/content/package-browser/', 'defaultStatus': 'unaffected'}, {'cpes': ['cpe:/o:redhat:enterprise_linux:9'], 'vendor': 'Red Hat', 'product': 'Red Hat Enterprise Linux 9', 'packageName': 'kernel-rt', 'collectionURL': 'https://access.redhat.com/downloads/content/package-browser/', 'defaultStatus': 'unaffected'}]
  • CVE Modified by 0b0ca135-0b70-47e7-9f44-1890c2a1c46c

    Jun. 30, 2026

    Action Type Old Value New Value
    Added Affected [{'cpes': ['cpe:/o:redhat:enterprise_linux:10'], 'vendor': 'Red Hat', 'product': 'Red Hat Enterprise Linux 10', 'defaultStatus': 'unaffected'}, {'cpes': ['cpe:/o:redhat:enterprise_linux:6'], 'vendor': 'Red Hat', 'product': 'Red Hat Enterprise Linux 6', 'defaultStatus': 'unaffected'}, {'cpes': ['cpe:/o:redhat:enterprise_linux:7'], 'vendor': 'Red Hat', 'product': 'Red Hat Enterprise Linux 7', 'defaultStatus': 'unaffected'}, {'cpes': ['cpe:/o:redhat:enterprise_linux:8'], 'vendor': 'Red Hat', 'product': 'Red Hat Enterprise Linux 8', 'defaultStatus': 'unaffected'}, {'cpes': ['cpe:/o:redhat:enterprise_linux:9'], 'vendor': 'Red Hat', 'product': 'Red Hat Enterprise Linux 9', 'defaultStatus': 'unaffected'}]
    Added CVSS V3.1 AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
    Added CWE CWE-825
    Added Reference https://access.redhat.com/security/cve/CVE-2026-31703
    Added Reference https://bugzilla.redhat.com/show_bug.cgi?id=2464385
    Added Reference https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-31703.json
  • CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67

    Jun. 19, 2026

    Action Type Old Value New Value
    Added Reference https://git.kernel.org/stable/c/156cc63691c1f20905510b1007896e090355e6c2
    Changed Affected [{'repo': 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git', 'vendor': 'Linux', 'product': 'Linux', 'versions': [{'status': 'affected', 'version': 'e1b849cfa6b61f1c866a908c9e8dd9b5aaab820b', 'lessThan': '028103656b84273c73e9e271cf95c9f3421f4b8a', 'versionType': 'git'}, {'status': 'affected', 'version': 'e1b849cfa6b61f1c866a908c9e8dd9b5aaab820b', 'lessThan': '9223e5f30403a9b506d6d0bff4f2e29a2d7d46af', 'versionType': 'git'}, {'status': 'affected', 'version': 'e1b849cfa6b61f1c866a908c9e8dd9b5aaab820b', 'lessThan': '6689f01d6740cf358932b3e97ee968c6099800d9', 'versionType': 'git'}], 'programFiles': ['fs/fs-writeback.c'], 'defaultStatus': 'unaffected'}, {'repo': 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git', 'vendor': 'Linux', 'product': 'Linux', 'versions': [{'status': 'affected', 'version': '6.18'}, {'status': 'unaffected', 'version': '0', 'lessThan': '6.18', 'versionType': 'semver'}, {'status': 'unaffected', 'version': '6.18.25', 'versionType': 'semver', 'lessThanOrEqual': '6.18.*'}, {'status': 'unaffected', 'version': '7.0.2', 'versionType': 'semver', 'lessThanOrEqual': '7.0.*'}, {'status': 'unaffected', 'version': '7.1', 'versionType': 'original_commit_for_fix', 'lessThanOrEqual': '*'}], 'programFiles': ['fs/fs-writeback.c'], 'defaultStatus': 'affected'}] [{'repo': 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git', 'vendor': 'Linux', 'product': 'Linux', 'versions': [{'status': 'affected', 'version': 'fabfc1fcddc5d8185722d4fde5f0968c4760b71e', 'lessThan': '156cc63691c1f20905510b1007896e090355e6c2', 'versionType': 'git'}, {'status': 'affected', 'version': 'e1b849cfa6b61f1c866a908c9e8dd9b5aaab820b', 'lessThan': '028103656b84273c73e9e271cf95c9f3421f4b8a', 'versionType': 'git'}, {'status': 'affected', 'version': 'e1b849cfa6b61f1c866a908c9e8dd9b5aaab820b', 'lessThan': '9223e5f30403a9b506d6d0bff4f2e29a2d7d46af', 'versionType': 'git'}, {'status': 'affected', 'version': 'e1b849cfa6b61f1c866a908c9e8dd9b5aaab820b', 'lessThan': '6689f01d6740cf358932b3e97ee968c6099800d9', 'versionType': 'git'}], 'programFiles': ['fs/fs-writeback.c'], 'defaultStatus': 'unaffected'}, {'repo': 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git', 'vendor': 'Linux', 'product': 'Linux', 'versions': [{'status': 'affected', 'version': '6.18'}, {'status': 'unaffected', 'version': '0', 'lessThan': '6.18', 'versionType': 'semver'}, {'status': 'unaffected', 'version': '6.18.25', 'versionType': 'semver', 'lessThanOrEqual': '6.18.*'}, {'status': 'unaffected', 'version': '7.0.2', 'versionType': 'semver', 'lessThanOrEqual': '7.0.*'}, {'status': 'unaffected', 'version': '7.1', 'versionType': 'original_commit_for_fix', 'lessThanOrEqual': '*'}], 'programFiles': ['fs/fs-writeback.c'], 'defaultStatus': 'affected'}]
  • CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67

    Jun. 17, 2026

    Action Type Old Value New Value
    Added Affected [{'repo': 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git', 'vendor': 'Linux', 'product': 'Linux', 'versions': [{'status': 'affected', 'version': 'e1b849cfa6b61f1c866a908c9e8dd9b5aaab820b', 'lessThan': '028103656b84273c73e9e271cf95c9f3421f4b8a', 'versionType': 'git'}, {'status': 'affected', 'version': 'e1b849cfa6b61f1c866a908c9e8dd9b5aaab820b', 'lessThan': '9223e5f30403a9b506d6d0bff4f2e29a2d7d46af', 'versionType': 'git'}, {'status': 'affected', 'version': 'e1b849cfa6b61f1c866a908c9e8dd9b5aaab820b', 'lessThan': '6689f01d6740cf358932b3e97ee968c6099800d9', 'versionType': 'git'}], 'programFiles': ['fs/fs-writeback.c'], 'defaultStatus': 'unaffected'}, {'repo': 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git', 'vendor': 'Linux', 'product': 'Linux', 'versions': [{'status': 'affected', 'version': '6.18'}, {'status': 'unaffected', 'version': '0', 'lessThan': '6.18', 'versionType': 'semver'}, {'status': 'unaffected', 'version': '6.18.25', 'versionType': 'semver', 'lessThanOrEqual': '6.18.*'}, {'status': 'unaffected', 'version': '7.0.2', 'versionType': 'semver', 'lessThanOrEqual': '7.0.*'}, {'status': 'unaffected', 'version': '7.1', 'versionType': 'original_commit_for_fix', 'lessThanOrEqual': '*'}], 'programFiles': ['fs/fs-writeback.c'], 'defaultStatus': 'affected'}]
  • Initial Analysis by [email protected]

    May. 06, 2026

    Action Type Old Value New Value
    Added CWE CWE-416
    Added CPE Configuration OR *cpe:2.3:o:linux:linux_kernel:7.1:rc1:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:7.1:rc2:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 6.19 up to (excluding) 7.0.2 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 6.18 up to (excluding) 6.18.25
    Added Reference Type kernel.org: https://git.kernel.org/stable/c/028103656b84273c73e9e271cf95c9f3421f4b8a Types: Patch
    Added Reference Type kernel.org: https://git.kernel.org/stable/c/6689f01d6740cf358932b3e97ee968c6099800d9 Types: Patch
    Added Reference Type kernel.org: https://git.kernel.org/stable/c/9223e5f30403a9b506d6d0bff4f2e29a2d7d46af Types: Patch
  • CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67

    May. 03, 2026

    Action Type Old Value New Value
    Added CVSS V3.1 AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
  • New CVE Received by 416baaa9-dc9f-4396-8d5f-8c081fb06d67

    May. 01, 2026

    Action Type Old Value New Value
    Added Description In the Linux kernel, the following vulnerability has been resolved: writeback: Fix use after free in inode_switch_wbs_work_fn() inode_switch_wbs_work_fn() has a loop like: wb_get(new_wb); while (1) { list = llist_del_all(&new_wb->switch_wbs_ctxs); /* Nothing to do? */ if (!list) break; ... process the items ... } Now adding of items to the list looks like: wb_queue_isw() if (llist_add(&isw->list, &wb->switch_wbs_ctxs)) queue_work(isw_wq, &wb->switch_work); Because inode_switch_wbs_work_fn() loops when processing isw items, it can happen that wb->switch_work is pending while wb->switch_wbs_ctxs is empty. This is a problem because in that case wb can get freed (no isw items -> no wb reference) while the work is still pending causing use-after-free issues. We cannot just fix this by cancelling work when freeing wb because that could still trigger problematic 0 -> 1 transitions on wb refcount due to wb_get() in inode_switch_wbs_work_fn(). It could be all handled with more careful code but that seems unnecessarily complex so let's avoid that until it is proven that the looping actually brings practical benefit. Just remove the loop from inode_switch_wbs_work_fn() instead. That way when wb_queue_isw() queues work, we are guaranteed we have added the first item to wb->switch_wbs_ctxs and nobody is going to remove it (and drop the wb reference it holds) until the queued work runs.
    Added Reference https://git.kernel.org/stable/c/028103656b84273c73e9e271cf95c9f3421f4b8a
    Added Reference https://git.kernel.org/stable/c/6689f01d6740cf358932b3e97ee968c6099800d9
    Added Reference https://git.kernel.org/stable/c/9223e5f30403a9b506d6d0bff4f2e29a2d7d46af
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.