Because cmd in struct spppreq (/usr/include/net/if_sppp.h) is an int, fuword32() should be used instead of fuword() in sys/net/if_spppsubr.c, line 5133, I think. Fix: Apply the patch I've appended. Or change the type of cmd in struct spppreq to unsigned long. Patch attached with submission follows: How-To-Repeat: Use /sbin/spppcontrol on a 64bit machine.
---------- Forwarded message ---------- From: Jens Wiatrowski <wiatro@gmx.net> Date: 23 October 2012 16:40 Subject: Re: Re: kern/173002: data type size problem in if_spppsubr.c To: Eitan Adler <lists@eitanadler.com> Hello Eitan, > >please send the output of "diff -u" (unified diff) - this makes it >more likely someone will look at the patch > Attached. Regards Jens -- Eitan Adler
Responsible Changed From-To: freebsd-bugs->freebsd-net Over to maintainer(s).
For bugs matching the following criteria: Status: In Progress Changed: (is less than) 2014-06-01 Reset to default assignee and clear in-progress tags. Mail being skipped
I have no clue which type is right here; return PR to the net@
Actually user space `struct spppreq spr` is not explicitly zeroed [1], so `fuword() / fueword()` can read garbage into kernel space. I guess /sbin/spppcontrol will get error EINVAL occasionally on a 64bit platforms. As this is an old report, not sure if the reporter Jens can confirm this. 1. https://cgit.freebsd.org/src/tree/sbin/spppcontrol/spppcontrol.c?h=stable/13#n63
(In reply to Zhenlei Huang from comment #5) Proposed fix https://reviews.freebsd.org/D47335 .