mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 00:22:00 +02:00
Merge branch 'tcp-two-fixes-for-socket-migration-in-reqsk_timer_handler'
Kuniyuki Iwashima says: ==================== tcp: Two fixes for socket migration in reqsk_timer_handler(). The series fixes two bugs in the error path of socket migration in reqsk_timer_handler(). Patch 1 fixes a potential UAF in reqsk_timer_handler(). Patch 2 fixes imbalanced icsk_accept_queue count. ==================== Link: https://patch.msgid.link/20260506035954.1563147-1-kuniyu@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
commit
4378bf6124
|
|
@ -1108,7 +1108,7 @@ static void reqsk_timer_handler(struct timer_list *t)
|
|||
|
||||
if (!inet_ehash_insert(req_to_sk(nreq), req_to_sk(oreq), NULL)) {
|
||||
/* delete timer */
|
||||
__inet_csk_reqsk_queue_drop(sk_listener, nreq, true);
|
||||
__inet_csk_reqsk_queue_drop(sk_listener, nreq, false);
|
||||
goto no_ownership;
|
||||
}
|
||||
|
||||
|
|
@ -1134,7 +1134,7 @@ static void reqsk_timer_handler(struct timer_list *t)
|
|||
}
|
||||
|
||||
drop:
|
||||
__inet_csk_reqsk_queue_drop(sk_listener, oreq, true);
|
||||
__inet_csk_reqsk_queue_drop(oreq->rsk_listener, oreq, true);
|
||||
reqsk_put(oreq);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user