Skip to content

Commit

Permalink
keysock: explicitly initialized LIST_HEAD
Browse files Browse the repository at this point in the history
This is supposed to fix syzcaller report.

Reported by:	syzbot+1e08b5f9f7f00383ddea@syzkaller.appspotmail.com
Fixes:		ea7be12
  • Loading branch information
glebius committed Aug 12, 2022
1 parent f277746 commit b7bf3cb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sys/netipsec/keysock.c
Expand Up @@ -72,7 +72,8 @@ MTX_SYSINIT(keysock, &keysock_mtx, "key socket pcb list", MTX_DEF);
#define KEYSOCK_LOCK() mtx_lock(&keysock_mtx)
#define KEYSOCK_UNLOCK() mtx_unlock(&keysock_mtx)

VNET_DEFINE_STATIC(LIST_HEAD(, keycb), keycb_list);
VNET_DEFINE_STATIC(LIST_HEAD(, keycb), keycb_list) =
LIST_HEAD_INITIALIZER(keycb_list);
#define V_keycb_list VNET(keycb_list)

static struct sockaddr key_src = { 2, PF_KEY, };
Expand Down

0 comments on commit b7bf3cb

Please sign in to comment.