Skip to content

Commit 2562eb7

Browse files
committed
af_unix: increase QUEUE_ENTRY_SIZE to the true max formatted string size
A valid oversized v1-formatted event can be dropped by audisp-af_unix causing loss of events for applications consuming the AF_UNIX plugin socket. It has specific conditions: the plugin input is binary, the incoming dispatcher event is protocol v1, the AF_UNIX plugin output format is string, and the record already was near MAX_AUDIT_MESSAGE_LENGTH. This almost never happens.
1 parent 6651388 commit 2562eb7

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

audisp/plugins/af_unix/audisp-af_unix.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ static struct mallinfo2 last_mi;
7070
#endif
7171

7272
#define DEFAULT_QUEUE_DEPTH 512
73-
#define QUEUE_ENTRY_SIZE MAX_AUDIT_EVENT_FRAME_SIZE+1
73+
#define V1_TEXT_PREFIX (32+12) // largest record type + formatting
74+
#define QUEUE_ENTRY_SIZE (MAX_AUDIT_EVENT_FRAME_SIZE+V1_TEXT_PREFIX+1)
7475

7576
static size_t queue_depth = DEFAULT_QUEUE_DEPTH;
7677
static struct queue *queue;

0 commit comments

Comments
 (0)