Project

General

Profile

Actions

Bug #435

closed

tp_meter: Unbound out-of-order ack handling

Added by Sven Eckelmann 5 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Target version:
Start date:
05/31/2026
Due date:
% Done:

0%

Estimated time:

Description

Doe batadv_tp_handle_out_of_order() lack a size limit on the out-of-order packet queue?

Looking at batadv_tp_handle_out_of_order():

        new = kmalloc_obj(*new, GFP_ATOMIC);
        if (unlikely(!new))
                return false;
[ ... ]
        spin_lock_bh(&tp_vars->unacked_lock);
        /* if the list is empty immediately attach this new object */
        if (list_empty(&tp_vars->unacked_list)) {
                list_add(&new->list, &tp_vars->unacked_list);
                goto out;
        }

Because new batadv_tp_unacked nodes are unconditionally allocated and queued into unacked_list without checking any receive window limits, could a remote attacker establish a session and flood the node with future sequence numbers?

Since batadv_tp_recv_msg() resets the inactivity timer for any matching packet, this could lead to unbounded memory allocation and an out-of-memory panic.

See https://sashiko.dev/#/patchset/20260531-tp-reason-missing-v4-0-5d2556e00128%40narfation.org?part=2 for details

Actions #2

Updated by Sven Eckelmann 4 months ago

  • Target version set to 2026.2
Actions #3

Updated by Sven Eckelmann 4 months ago

  • Status changed from New to In Progress
Actions #4

Updated by Sven Eckelmann 4 months ago

  • Status changed from In Progress to Resolved
Actions #5

Updated by Sven Eckelmann 4 months ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF