Re: [PATCH] serial: 8250: validate iomem_base in serial8250_verify_port()

Jiri Slaby <[email protected]> Mon, 20 Jul 2026 08:08:48 +0200
Newsgroups org.kernel.vger.linux-serial,org.kernel.vger.linux-kernel,org.kernel.vger.stable
Message-ID <[email protected]>
On 20. 07. 26, 7:37, Mingyu Wang wrote:
> Fix this by tightening the validation in serial8250_verify_port().
> Reject any TIOCSSERIAL requests that attempt to modify the io_type
> to/from memory-mapped types, or change the iomem_base of an existing
> memory-mapped port. Userspace can still legitimately modify IRQs or
> baud rates of MMIO ports as long as the io_type and mapbase remain
> unchanged.

Pardon my ignorance, but isn't TIOCSSERIAL intended exactly to change 
the type or mapbase when needed for ports without UPF_FIXED_PORT (and 
under root)?

thanks,
-- 
js
suse labs