The disclosure in the TCP network stack was introduced in 11.0.

Corresponding upstream changeset from
https://www.freebsd.org/security/advisories/FreeBSD-EN-18:05.mem.asc.
dev
fengbojiang(姜凤波) 2019-11-22 14:39:26 +08:00
parent d0b1b30af0
commit da6a6342a9
1 changed files with 3 additions and 1 deletions

View File

@ -1566,7 +1566,9 @@ tcp_ctloutput(struct socket *so, struct sockopt *sopt)
return (error);
} else if ((sopt->sopt_dir == SOPT_GET) &&
(sopt->sopt_name == TCP_FUNCTION_BLK)) {
strcpy(fsn.function_set_name, tp->t_fb->tfb_tcp_block_name);
strncpy(fsn.function_set_name, tp->t_fb->tfb_tcp_block_name,
TCP_FUNCTION_NAME_LEN_MAX);
fsn.function_set_name[TCP_FUNCTION_NAME_LEN_MAX - 1] = '\0';
fsn.pcbcnt = tp->t_fb->tfb_refcnt;
INP_WUNLOCK(inp);
error = sooptcopyout(sopt, &fsn, sizeof fsn);