aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/sctputil.h
diff options
context:
space:
mode:
authorMichael Tuexen <tuexen@FreeBSD.org>2020-03-28 20:25:45 +0000
committerMichael Tuexen <tuexen@FreeBSD.org>2020-03-28 20:25:45 +0000
commit25ec35535397c0fea7b958fa63aa7754e0154d98 (patch)
tree50a05774134a3c141497c0225764c707c04ad3de /sys/netinet/sctputil.h
parentfb1bc03eee1cb693fe15da1eaab2dd08d085b64c (diff)
downloadsrc-25ec35535397c0fea7b958fa63aa7754e0154d98.tar.gz
src-25ec35535397c0fea7b958fa63aa7754e0154d98.zip
Handle integer overflows correctly when converting msecs and secs to
ticks and vice versa. These issues were caught by recently added panic() calls on INVARIANTS systems. Reported by: syzbot+b44787b4be7096cd1590@syzkaller.appspotmail.com Reported by: syzbot+35f82d22805c1e899685@syzkaller.appspotmail.com MFC after: 1 week
Notes
Notes: svn path=/head/; revision=359405
Diffstat (limited to 'sys/netinet/sctputil.h')
-rw-r--r--sys/netinet/sctputil.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/netinet/sctputil.h b/sys/netinet/sctputil.h
index 031ad615a0f3..98efb8a6652a 100644
--- a/sys/netinet/sctputil.h
+++ b/sys/netinet/sctputil.h
@@ -392,5 +392,10 @@ void sctp_hc_set_mtu(union sctp_sockstore *, uint16_t, uint32_t);
uint32_t sctp_hc_get_mtu(union sctp_sockstore *, uint16_t);
void sctp_set_state(struct sctp_tcb *, int);
void sctp_add_substate(struct sctp_tcb *, int);
+uint32_t sctp_ticks_to_msecs(uint32_t);
+uint32_t sctp_msecs_to_ticks(uint32_t);
+uint32_t sctp_ticks_to_secs(uint32_t);
+uint32_t sctp_secs_to_ticks(uint32_t);
+
#endif /* _KERNEL */
#endif