As noted by Roel Bouwman Linux allows a large buffer size than the
struct ucred size. Fix this. PR: 102956 Reported by: Roel Bouwman <roel at qsp nl> MFC after: 1 week
This commit is contained in:
parent
dd92181f60
commit
cd92d27e16
@ -1619,7 +1619,7 @@ linux_getsockopt(struct thread *td, struct linux_getsockopt_args *args)
|
||||
sizeof(linux_tv)));
|
||||
/* NOTREACHED */
|
||||
case LOCAL_PEERCRED:
|
||||
if (args->optlen != sizeof(lxu))
|
||||
if (args->optlen < sizeof(lxu))
|
||||
return (EINVAL);
|
||||
xulen = sizeof(xu);
|
||||
error = kern_getsockopt(td, args->s, bsd_args.level,
|
||||
|
Loading…
x
Reference in New Issue
Block a user