Project

General

Profile

Actions

Bug #437

open

tp_meter: thread unsafe last_recv modifications

Added by Sven Eckelmann 14 days ago. Updated 5 days ago.

Status:
Resolved
Priority:
Normal
Target version:
Start date:
06/04/2026
Due date:
% Done:

0%

Estimated time:

Description

tp_vars->last_recv is read without synchronization. If duplicate or reordered packets are processed concurrently on multiple CPU cores, both cores might bypass the out-of-order check and concurrently execute:

tp_vars->last_recv += packet_size;

Could this double-count payload bytes and permanently corrupt the receiver state machine? Note that while a later patch introduces locking for sender variables, receiver-side variables like last_recv appear to remain unguarded.

See https://sashiko.dev/#/patchset/20260603072527.174487-1-sw@simonwunderlich.de?part=3

Actions #1

Updated by Sven Eckelmann 14 days ago

  • Subject changed from tp_meter: last_recv modifications are unlocked: to tp_meter: last_recv modifications are unlocked
  • Description updated (diff)
Actions #2

Updated by Sven Eckelmann 14 days ago

  • Subject changed from tp_meter: last_recv modifications are unlocked to tp_meter: thread unsafe last_recv modifications
Actions #4

Updated by Sven Eckelmann 6 days ago

  • Status changed from New to In Progress
Actions #5

Updated by Sven Eckelmann 5 days ago

  • Status changed from In Progress to Resolved
Actions

Also available in: Atom PDF