Project

General

Profile

Actions

Bug #4801

closed

af-packet: tpacket v3 socket reference handling broken

Added by Victor Julien about 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

The v3 code references the socket AFPParsePacketV3 using AFPRefSocket, so per packet.

However, in contrast to the V2 code, the release callback AFPReleasePacketV3 does not release the reference.

I've confirmed that this reference counter only increases, and most likely wraps around regularly in high speed networks as the counter is only an int (side note: wrap arounds of signed ints are undefined behavior).

Its easy to add the deref logic of course, but the question is: do we really need it? In V3 we seem to have never have had it, so can we keep doing without it?


Related issues 1 (0 open1 closed)

Related to Suricata - Bug #4804: af-packet: tpacket v3 if/down logic brokenClosedVictor JulienActions
Actions

Also available in: Atom PDF