mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
Check sopt_level in uipc_ctloutput() and return early if it is non-zero.
This prevents unintended consequnces when an application calls things like setsockopt(x, SOL_SOCKET, SO_REUSEADDR, ...) on a Unix domain socket.
This commit is contained in:
parent
a378bbabe6
commit
96a041b533
1 changed files with 3 additions and 0 deletions
|
|
@ -617,6 +617,9 @@ uipc_ctloutput(struct socket *so, struct sockopt *sopt)
|
|||
struct xucred xu;
|
||||
int error, optval;
|
||||
|
||||
if (sopt->sopt_level != 0)
|
||||
return (EINVAL);
|
||||
|
||||
UNP_LOCK();
|
||||
unp = sotounpcb(so);
|
||||
if (unp == NULL) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue