Re: [PATCH net] ppp: remove SC_MUST_COMP
From: Simon Horman
Date: Sat Oct 31 2026 - 13:50:42 EST
On Sat, Oct 31, 2026 at 09:28:10AM +0800, Qingfang Deng wrote:
> On 10/31/2026 5:32 AM, netdev-bot+sashiko@xxxxxxxxxx wrote:
> > [Severity: Medium]
> > Does the fix need the define to be removed from the UAPI header?
> >
> > PPPIOCSFLAGS already masks the user value with the kernel-internal
> > SC_FLAG_BITS:
> >
> > drivers/net/ppp/ppp_generic.c:ppp_ioctl() {
> > ...
> > ppp->flags = val & SC_FLAG_BITS;
> > ...
> > }
> >
> > Removing the bit from SC_FLAG_BITS (and SC_MASK), together with the two
> > checks, looks like enough to stop SC_DC_ERROR from being stored as a
> > config flag.
> >
> > Deleting the define is a separate change at the source level. Userspace
> > that includes <linux/ppp-ioctl.h>, directly or through <linux/if_ppp.h>,
> > and refers to SC_MUST_COMP would no longer build.
> >
> > The commit message calls the flag unused, but the evidence is that one
> > pppd integration from 2005 never landed upstream. That does not rule out
> > out-of-tree pppd MPPE forks or other daemons that use the name.
> >
> > With the Fixes: tag pointing at a 2005 commit, this header change will
> > likely be backported to the stable kernel-headers as well.
> >
> > Would it work to keep the define, with a comment that the kernel ignores
> > it and that it aliases SC_DC_ERROR, while still dropping it from
> > SC_FLAG_BITS and SC_MASK and removing the checks?
>
> I found no trace of existing users (searched GitHub). Even _if_ there are
> any, _and_ SC_MUST_COMP does not alias SC_DC_ERROR, the logic is still
> flawed - received packets are silently dropped without noticing the
> userspace.
>
> If the goal is to prevent the removal from backports, I may split out the
> removal part into a net-next patch.
I lean towards your existing approach: it's broken, and that brought
to the attention of any user of it.
Reviewed-by: Simon Horman <horms@xxxxxxxxxx>