Re: [PATCH net v2] ppp: remove SC_MUST_COMP

From: Paolo Abeni

Date: Thu Nov 05 2026 - 07:43:51 EST


On 11/3/26 02:56, Qingfang Deng wrote:
SC_MUST_COMP accidentally shares the same value with SC_DC_ERROR.
PPPIOCGFLAGS combines configuration flags with transmit and receive
state, so userspace cannot distinguish them, and a read-modify-write
sequence can promote a decompression error into SC_MUST_COMP.

With SC_MUST_COMP set, intentional or not, a fatal decompression error
(SC_DC_FERROR) causes the receive path to silently drop the failed
packet before delivering it to userspace. pppd therefore cannot detect
the error and reset the compressor's state. Subsequent incoming IP and
CCP packets hit the same check and are also dropped, preventing normal
recovery.

The flag entered Linux in 2005 with commit b3f9b92a6ec1 ("[PPP]: add PPP
MPPE encryption module"). The original patch submission [1] said pppd
would set it when CCP came up with MPPE enabled. That intended
integration [2] appears never to have landed upstream.

Remove the broken and unused SC_MUST_COMP from SC_MASK and SC_FLAG_BITS,
and remove its transmit and receive drop checks. Keep the uAPI macro and
mark it as obsolete. PPPIOCSFLAGS will discard this bit while
PPPIOCGFLAGS can still report it as SC_DC_ERROR.

[1] https://lore.kernel.org/netdev/20050814141046.GB20944@xxxxxxxxxxxxxxxxx/
[2] https://lore.kernel.org/netdev/20050814190529.GA26802@xxxxxxxxxxxxxxxxx/
Fixes: b3f9b92a6ec1 ("[PPP]: add PPP MPPE encryption module")
Signed-off-by: Qingfang Deng <qingfang.deng@xxxxxxxxx>
Given the 'broken from beginning' status and the hopefully low impact, I'm
applying this to net-next.

/P