⚠️

سلب مسئولیت و اخلاق حرفه‌ای

این مطالب صرفاً برای اهداف آموزشی، پژوهشی و افزایش آگاهی امنیتی ارائه شده‌اند. هرگونه استفاده غیرمجاز، غیرقانونی یا سوءاستفاده از اطلاعات، ابزارها و روش‌های مطرح‌شده، کاملاً بر عهده مخاطب است. نویسنده و منتشرکننده هیچ مسئولیتی در قبال خسارات، آسیب‌ها یا پیامدهای ناشی از استفاده نادرست از این مطالب نخواهند داشت.

CVE-2026-142995: Linux Samsung Serial Driver Leaks Clock References | Alireza Bolbolabadi - Red Team Security
LOADING

CVE-2026-142995: Linux Samsung Serial Driver Leaks Clock References

Executive summary

CVE-2026-142995 describes a resource-management flaw in the Linux kernel's serial: samsung driver, used with Samsung S3C24xx serial controllers on ARM-based systems. A process that can open the affected serial port can repeatedly invoke the terminal-settings path and cause the driver to retain unreleased clock references.

Each trigger leaks a struct clk and a copy of the clock's connection name. The defect does not directly corrupt memory or bypass kernel permissions, but it creates a repeatable source of kernel memory growth. Its practical impact is greatest on memory-constrained embedded devices, where sustained leakage could eventually degrade system stability.

Technical analysis

The vulnerable interaction occurs between s3c24xx_serial_getclk() and s3c24xx_serial_set_termios():

  • s3c24xx_serial_getclk() acquires a reference to the clock considered the best match for the requested baud rate.

  • s3c24xx_serial_set_termios() stores the resulting handle in ourport->baudclk and disables the previous clock without releasing its reference.

  • Because each clk_get() call returns a new handle, the replacement handle does not match the old one. The old reference therefore remains unreleased.

  • The upstream resolution also accounts for the error path by releasing the new clock when it is not stored.

The terminal settings callback can be reached through tcsetattr(). Consequently, a process holding an open descriptor for the relevant serial device can repeat the operation and accumulate leaked kernel objects. The primitive is deterministic but comparatively slow because it requires repeated local operations against an already-open port.

This is a local resource leak rather than a remote code-execution or memory-corruption issue. The supplied record contains no CVSS vector, no CISA KEV listing, and no evidence of exploitation in the wild.

Affected systems

The affected component is the Linux kernel serial: samsung driver for Samsung S3C24xx serial hardware.

The provided source does not enumerate affected kernel versions, identify the fixing commit, or state which Linux distributions have backported the correction. It also does not establish the precise device-node path for every platform. Systems are potentially exposed when all of the following apply:

  • The running kernel includes the affected serial: samsung driver implementation.

  • The Samsung serial controller is present and its port is accessible to a local process.

  • The process can repeatedly change the port's terminal settings through the tcsetattr() path.

Mitigation

Apply the upstream correction that releases the previous baud clock when replacing it and releases the new clock when it is not retained. Because the supplied source does not name the fixing commit or affected release boundaries, the applicable patch should be verified against the NVD record for CVE-2026-142995 and the relevant Linux distribution's kernel errata.

Where an immediate kernel update is not available, restrict access to the affected serial device nodes through device ownership and permission controls. This limits the ability of non-privileged processes to open the port and reach the vulnerable callback. On embedded images that do not use the controller, removing the serial: samsung driver from the kernel configuration eliminates the vulnerable path.

For investigation, correlate abnormal kernel slab growth involving struct clk allocations and duplicated connection-name strings with processes repeatedly invoking tcsetattr() on the same serial descriptor. A clock-reference balance test across repeated terminal-settings changes provides direct confirmation of the flaw.

Expert insight

The key security significance is not immediate privilege escalation but the conversion of a normal interface operation into an unbounded resource-allocation primitive. The leaked object is small, yet the callback can be repeated cheaply, making the issue relevant to long-lived embedded systems that expose a serial port to less-trusted local applications.

Affected platforms require an additional exposure condition: access to the serial device. That narrows the population of potentially triggerable systems compared with vulnerabilities reachable through an unprivileged network service. However, device permissions can be overlooked in embedded deployments, and a long-running process can make memory growth gradual rather than obvious.

The upstream fix reflects the correct clock-framework lifecycle: every acquired reference must have exactly one corresponding release, including when a newly acquired handle is rejected or replaced.

منابع

·
← اخبار