9p/trans_fd: p9_fd_request: kick rx thread if EPOLLIN
In the Linux kernel, the following vulnerability has been resolved: 9p/trans_fd: p9_fd_request: kick rx thread if EPOLLIN p9_read_work() doesn't set Rworksched and doesn't do schedule_work(m->rq) if list_empty(&m->req_list). However, if the pipe is full, we need to read more data and this used to work prior to commit aaec5a95d59615 ("pipe_read: don't wake up the writer if the pipe is still full"). p9_read_work() does p9_fd_read() -> ... -> anon_pipe_read() which (before the commit above) triggered the unnecessary wakeup. This wakeup calls p9_pollwake() which kicks p9_poll_workfn() -> p9_poll_mux(), p9_poll_mux() will notice EPOLLIN and schedule_work(&m->rq). This no longer happens after the optimization above, change p9_fd_request() to use p9_poll_mux() instead of only checking for EPOLLOUT.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 6.17.8
- CVEs
- CVE-2025-40305
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 16:30 UTC · Revision 1
Source evidence
9p/trans_fd: p9_fd_request: kick rx thread if EPOLLIN
core-osv · Original sourcePublished 8 Dec 2025, 00:46 UTC
In the Linux kernel, the following vulnerability has been resolved: 9p/trans_fd: p9_fd_request: kick rx thread if EPOLLIN p9_read_work() doesn't set Rworksched and doesn't do schedule_work(m->rq) if list_empty(&m->req_list). However, if the pipe is full, we need to read more data and this used to work prior to commit aaec5a95d59615 ("pipe_read: don't wake up the writer if the pipe is still full"). p9_read_work() does p9_fd_read() -> ... -> anon_pipe_read() which (before the commit above) triggered the unnecessary wakeup. This wakeup calls p9_pollwake() which kicks p9_poll_workfn() -> p9_poll_mux(), p9_poll_mux() will notice EPOLLIN and schedule_work(&m->rq). This no longer happens after the optimization above, change p9_fd_request() to use p9_poll_mux() instead of only checking for EPOLLOUT.
osv:CVE-2025-40305
Kernel
Fixed versions: 6.17.8
Complete source record
{
"id": "b863d7aa0183538bc39305b1b910589ab4206694b6a332a01707b380a167d767",
"url": "https://osv.dev/vulnerability/CVE-2025-40305",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "9p/trans_fd: p9_fd_request: kick rx thread if EPOLLIN",
"summary": "In the Linux kernel, the following vulnerability has been resolved: 9p/trans_fd: p9_fd_request: kick rx thread if EPOLLIN p9_read_work() doesn't set Rworksched and doesn't do schedule_work(m->rq) if list_empty(&m->req_list). However, if the pipe is full, we need to read more data and this used to work prior to commit aaec5a95d59615 (\"pipe_read: don't wake up the writer if the pipe is still full\"). p9_read_work() does p9_fd_read() -> ... -> anon_pipe_read() which (before the commit above) triggered the unnecessary wakeup. This wakeup calls p9_pollwake() which kicks p9_poll_workfn() -> p9_poll_mux(), p9_poll_mux() will notice EPOLLIN and schedule_work(&m->rq). This no longer happens after the optimization above, change p9_fd_request() to use p9_poll_mux() instead of only checking for EPOLLOUT.",
"evidence": "osv:CVE-2025-40305",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "6.17.8",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "unknown",
"structured": {
"id": "CVE-2025-40305",
"aliases": [
"CVE-2025-40305"
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "aaec5a95d59615523db03dd53c2052f0a87beea7"
},
{
"fixed": "242531004d7de8c159f9bfadebe33fe8060b1046"
},
{
"fixed": "e8fe3f07a357c39d429e02ca34f740692d88967a"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-40305.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.14.0"
},
{
"fixed": "6.17.8"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-40305.json"
}
}
],
"modified": "2026-10-28T02:30:30.806029695Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/242531004d7de8c159f9bfadebe33fe8060b1046",
"https://git.kernel.org/stable/c/e8fe3f07a357c39d429e02ca34f740692d88967a",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/40xxx/CVE-2025-40305.json",
"https://nvd.nist.gov/vuln/detail/CVE-2025-40305",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/40xxx/CVE-2025-40305.json"
}
},
"related_cves": [
{
"value": "CVE-2025-40305",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": null
},
"source_id": "core-osv",
"document_id": 497394,
"published_at": "2025-12-08T00:46:30.327+00:00"
}