summaryrefslogtreecommitdiff
path: root/fs/devfs/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorMartin Schiller <ms@dev.tdt.de>2026-03-31 09:43:17 +0200
committerPaolo Abeni <pabeni@redhat.com>2026-04-02 13:36:08 +0200
commitd10a26aa4d072320530e6968ef945c8c575edf61 (patch)
tree4731dbbf43336358a6da3c70a702954471960122 /fs/devfs/git@git.tavy.me:linux.git
parent9351edf65cb6ba10564f9c81e3c52cf97f4b2a81 (diff)
net/x25: Fix potential double free of skb
When alloc_skb fails in x25_queue_rx_frame it calls kfree_skb(skb) at line 48 and returns 1 (error). This error propagates back through the call chain: x25_queue_rx_frame returns 1 | v x25_state3_machine receives the return value 1 and takes the else branch at line 278, setting queued=0 and returning 0 | v x25_process_rx_frame returns queued=0 | v x25_backlog_rcv at line 452 sees queued=0 and calls kfree_skb(skb) again This would free the same skb twice. Looking at x25_backlog_rcv: net/x25/x25_in.c:x25_backlog_rcv() { ... queued = x25_process_rx_frame(sk, skb); ... if (!queued) kfree_skb(skb); } Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Martin Schiller <ms@dev.tdt.de> Link: https://patch.msgid.link/20260331-x25_fraglen-v4-1-3e69f18464b4@dev.tdt.de Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'fs/devfs/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions