Retiring BSD-Compress Proposed For Linux PPP Network Code

Retiring BSD-Compress Proposed For Linux PPP Network Code

A patch has been proposed to remove the BSD-Compress support from the Linux kernel for the Linux networking point-to-point protocol (PPP) due to being unmaintained and having fundamental issues with the code that can lead to a fatal error. CONFIG_PPP_BSDCOMP allowed for BSD-Compress data compression for Point-To-Point Protocol connections. These days it's largely a legacy artifact. Linux developer Qingfang Deng laid out the case today for removing the BSD-Compress support from the PPP networking code due to a fatal error possible around the decoder's accumulator width on 64-bit systems leading to uncompressed packets. The BSD-Compress code within the kernel hasn't been touched much either since the 1990s. Beyond that, the Linux PPP protocol and compressors are orphaned within the Linux kernel. "The BSD-Compress decoder assumes that accm is 32 bits, but declares it as unsigned long. On 64-bit systems, consumed code bits survive the left shift and corrupt the next code. An x86-64 PPP-over-PTY loopback test reproduces a fatal bad-code error on the first compressed packet. pppd normally requests Deflate in preference to BSD-Compress when both methods can be negotiated. If BSD-Compress is selected and encounters this fatal error, pppd disables compression and logs: Lost compression sync: disabling compression The link remains up and traffic can continue uncompressed. The core compression routine has remained unchanged since Linux 2.1.67 (1997), and the decompression routine since its introduction in Linux 1.3.33 (1995). Later changes have updated module integration and lifetime handling, kernel APIs, allocation hardening, metadata and code organization, without correcting the decoder's accumulator width. A related problem was reported in 2024, when review suggested using unsigned int. The decoder still uses unsigned long. The PPP protocol drivers and compressors are orphaned." The removal patch is pending review on the netdev mailing list.

Original Source

Read the full article at Phoronix →

KhanList aggregates and links to publicly available news content. We do not host full articles from third-party sources. Always verify important information with original sources.