---
id: "CVE-2026-98749"
kind: "vulnerability"
aliases: ["CVE-2026-98749"]
title: "Linux kernel: max3100 serial driver frees port while timer still armed"
severity: "unknown"
cvss: null
epss: null
exploited: false
status: "open"
category: "runtime"
products: []
ecosystems: []
tags: ["embedded", "linux-kernel", "runtime", "spi-serial"]
not_affected_if: ["driver-not-loaded", "no-max3100-hardware"]
published_at: "2026-10-18T16:17:28+00:00"
first_seen_at: "2026-10-23T21:57:16+00:00"
updated_at: "2026-10-25T05:16:57+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-98749", "first_seen_at": "2026-10-23T21:57:16+00:00"}]
---

# Linux kernel: max3100 serial driver frees port while timer still armed

In the Linux kernel's max3100 serial driver, unbinding the SPI device during system suspend can free the port while its polling timer is still armed, so the timer callback may touch freed memory. The sources do not state the attacker-reachable impact beyond this memory-safety bug.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check whether the kernel includes the max3100 serial driver (`CONFIG_SERIAL_MAX3100`) and whether an SPI MAX3100 device is in use, e.g. `lsmod | grep max3100`
- Compare the running kernel to the fixed upstream release: `uname -r` (fixed version unknown)

## Fix

- Update the Linux kernel to a release that includes the upstream commit for 'tty: serial: max3100: shut down timer before freeing port' (exact version unknown)

## Timeline

- 2026-10-23T21:57:16+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-98749

## From the sources

In the Linux kernel, the following vulnerability has been resolved:

tty: serial: max3100: shut down timer before freeing port

max3100_shutdown() stops the polling timer but returns early during
system suspend. If the SPI device is unbound before resume, the serial
core does not call max3100_shutdown() again, so max3100_remove() frees
the port while the timer remains armed. max3100_timeout() may then
access the freed port and re-arm the timer.

Add final timer teardown to max3100_remove() and use
timer_shutdown_sync() to prevent a racing callback from re-arming it.
Also free the IRQ and destroy the workqueue there before freeing the
port. Keep timer_delete_sync() in max3100_shutdown() so that a
subsequent open() can re-arm the timer.

The workqueue is created before request_irq() and destroyed on both
request_irq() failure and normal shutdown. Its presence at remove thus
identifies the IRQ left registered when suspend bypasses shutdown.

Free the IRQ before destroying the workqueue, in both
max3100_shutdown() and max3100_remove(), and cancel the pending work
in between. free_irq() waits for a running interrupt handler to
finish and no new handler can start afterwards, so a racing handler
cannot queue work on a workqueue that is being destroyed; the
force_end_work check in max3100_dowork() only narrows that window, as
a handler delayed between the check and queue_work() could still run
after the teardown has cleared the workqueue pointer. Cancelling the
work also keeps destroy_workqueue() from waiting on a queued work item
in case remove() ever runs while the freezable workqueue is still
frozen, e.g. device removal during the resume window, before
workqueues are thawed.

This issue was found by an in-house static analysis tool.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
