From 8a956abe12c6b7e1a76e849dd6323910da998da9 Mon Sep 17 00:00:00 2001 From: Michael Tuexen Date: Sun, 14 Jul 2019 12:04:39 +0000 Subject: When calling sctp_initialize_auth_params(), the inp must have at least a read lock. To avoid more complex locking dances, just call it in sctp_aloc_assoc() when the write lock is still held. Reported by: syzbot+08a486f7e6966f1c3cfb@syzkaller.appspotmail.com MFC after: 1 week --- sys/netinet/sctp_pcb.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sys/netinet/sctp_pcb.h') diff --git a/sys/netinet/sctp_pcb.h b/sys/netinet/sctp_pcb.h index 5b41ae8a6cff..0f5aca88ed47 100644 --- a/sys/netinet/sctp_pcb.h +++ b/sys/netinet/sctp_pcb.h @@ -578,9 +578,13 @@ int sctp_is_address_on_local_host(struct sockaddr *addr, uint32_t vrf_id); void sctp_inpcb_free(struct sctp_inpcb *, int, int); +#define SCTP_DONT_INITIALIZE_AUTH_PARAMS 0 +#define SCTP_INITIALIZE_AUTH_PARAMS 1 + struct sctp_tcb * sctp_aloc_assoc(struct sctp_inpcb *, struct sockaddr *, - int *, uint32_t, uint32_t, uint16_t, uint16_t, struct thread *); + int *, uint32_t, uint32_t, uint16_t, uint16_t, struct thread *, + int); int sctp_free_assoc(struct sctp_inpcb *, struct sctp_tcb *, int, int); -- cgit v1.2.3