All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 5.10] net: 9p: fix refcount leak in p9_read_work() error handling
@ 2026-06-18 15:19 Alexander Martyniuk
  2026-06-20 11:54 ` Sasha Levin
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Martyniuk @ 2026-06-18 15:19 UTC (permalink / raw)
  To: stable, Greg Kroah-Hartman
  Cc: Alexander Martyniuk, Eric Van Hensbergen, Latchesar Ionkov,
	Dominique Martinet, David S. Miller, Jakub Kicinski,
	Tomas Bortoli, v9fs-developer, netdev, linux-kernel,
	Eric Van Hensbergen, Christian Schoenebeck, v9fs, lvc-project,
	Hangyu Hua

From: Hangyu Hua <hbh25y@gmail.com>

commit 4ac7573e1f9333073fa8d303acc941c9b7ab7f61 upstream.

p9_req_put need to be called when m->rreq->rc.sdata is NULL to avoid
temporary refcount leak.

Link: https://lkml.kernel.org/r/20220712104438.30800-1-hbh25y@gmail.com
Fixes: 728356dedeff ("9p: Add refcount to p9_req_t")
Signed-off-by: Hangyu Hua <hbh25y@gmail.com>
[Dominique: commit wording adjustments, p9_req_put argument fixes for rebase]
Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
[Alexander: this branch doesn't contain 8b11ff098af4 ("9p: Add client parameter
 to p9_req_put()"), therefore the parameter is removed from the added line]
Signed-off-by: Alexander Martyniuk <alexevgmart@gmail.com>
---
Backport fix for CVE-2022-50114
 net/9p/trans_fd.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/9p/trans_fd.c b/net/9p/trans_fd.c
index 40d458c438df..bd6a54e6f427 100644
--- a/net/9p/trans_fd.c
+++ b/net/9p/trans_fd.c
@@ -346,6 +346,7 @@ static void p9_read_work(struct work_struct *work)
 			p9_debug(P9_DEBUG_ERROR,
 				 "No recv fcall for tag %d (req %p), disconnecting!\n",
 				 m->rc.tag, m->rreq);
+			p9_req_put(m->rreq);
 			m->rreq = NULL;
 			err = -EIO;
 			goto error;
-- 
2.47.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 5.10] net: 9p: fix refcount leak in p9_read_work() error handling
  2026-06-18 15:19 [PATCH 5.10] net: 9p: fix refcount leak in p9_read_work() error handling Alexander Martyniuk
@ 2026-06-20 11:54 ` Sasha Levin
  0 siblings, 0 replies; 2+ messages in thread
From: Sasha Levin @ 2026-06-20 11:54 UTC (permalink / raw)
  To: stable, Greg Kroah-Hartman
  Cc: Sasha Levin, Alexander Martyniuk, Eric Van Hensbergen,
	Latchesar Ionkov, Dominique Martinet, David S. Miller,
	Jakub Kicinski, Tomas Bortoli, v9fs-developer, netdev,
	linux-kernel, Eric Van Hensbergen, Christian Schoenebeck, v9fs,
	lvc-project, Hangyu Hua

> [PATCH 5.10] net: 9p: fix refcount leak in p9_read_work() error handling

Queued for 5.10, thanks.

-- 
Thanks,
Sasha

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-06-20 11:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-18 15:19 [PATCH 5.10] net: 9p: fix refcount leak in p9_read_work() error handling Alexander Martyniuk
2026-06-20 11:54 ` Sasha Levin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.