HomeFreeBSD

kgssapi(4): Don't allow user-provided arguments to overrun stack buffer

Description

kgssapi(4): Don't allow user-provided arguments to overrun stack buffer

An over-long path argument to gssd_syscall could overrun the stack sockaddr_un
buffer. Fix gssd_syscall to not permit that.

If an over-long path is provided, gssd_syscall now returns EINVAL.

It looks like PRIV_NFS_DAEMON isn't granted anywhere, so my best guess is that
this is likely only triggerable by root.

Reported by: Coverity
CID: 1006751
Sponsored by: EMC / Isilon Storage Division

Details

Provenance
cemAuthored on
Parents
rS298337: pty(4): Use strlcpy to guarantee destination buffer isn't overrun
Branches
Unknown
Tags
Unknown