]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
io_uring/cmd_net: fix wrong argument types for skb_queue_splice()
authorJens Axboe <axboe@kernel.dk>
Thu, 20 Nov 2025 18:40:15 +0000 (11:40 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 1 Dec 2025 10:45:39 +0000 (11:45 +0100)
commit 46447367a52965e9d35f112f5b26fc8ff8ec443d upstream.

If timestamp retriving needs to be retried and the local list of
SKB's already has entries, then it's spliced back into the socket
queue. However, the arguments for the splice helper are transposed,
causing exactly the wrong direction of splicing into the on-stack
list. Fix that up.

Cc: stable@vger.kernel.org
Reported-by: Google Big Sleep <big-sleep-vuln-reports+bigsleep-462435176@google.com>
Fixes: 9e4ed359b8ef ("io_uring/netcmd: add tx timestamping cmd support")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
io_uring/cmd_net.c

index 3866fe6ff541d5677396746df5d66512cd281572..2bd24e8a5aeabcc936266ccde71d1e89f9657627 100644 (file)
@@ -126,7 +126,7 @@ static int io_uring_cmd_timestamp(struct socket *sock,
 
        if (!unlikely(skb_queue_empty(&list))) {
                scoped_guard(spinlock_irqsave, &q->lock)
-                       skb_queue_splice(q, &list);
+                       skb_queue_splice(&list, q);
        }
        return -EAGAIN;
 }