Skip to content

serial: core: fix baud rate fallback loop and baud_base overflow

Hui Peng linux-serial lkml stable 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v8 Latest2 patches 3 repliesIn review
  2. v72 patches 11 repliesSuperseded

Changes in v8 from the cover letter

- 1/2: Rewrote commit description to detail the step-by-step loop iteration progression (try == 0, try == 1, try == 2) as requested by Ilpo Järvinen and Greg Kroah-Hartman.
- 2/2: Dropped secondary Fixes: 6eabce6608d6 tag per Hugo Villeneuve feedback.

Patches in v8 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2serial: core: fix baud rate fallback in uart_get_baud_rate()drivers/tty/serial/serial_core.c+1 -12 replies
2/2serial: core: reject baud_base values that overflow port->uartclk in uart_set_info()drivers/tty/serial/serial_core.c+5 -21 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v8 yet.

Read the v8 thread

Cover letter [PATCH v8 0/2] serial: core: fix baud rate fallback loop and baud_base overflow

This series addresses two issues in serial core:
1. Division-by-zero WARN/Oops during baud rate fallback in uart_get_baud_rate().
2. 32-bit unsigned overflow in uart_set_info() when multiplying new_info->baud_base by 16.

All patches are ported to the latest tip of mainline (551c722f4080) and dynamically verified in QEMU KVM with CONFIG_KASAN=y.

Changes in v8:
- 1/2: Rewrote commit description to detail the step-by-step loop iteration progression (try == 0, try == 1, try == 2) as requested by Ilpo Järvinen and Greg Kroah-Hartman.
- 2/2: Dropped secondary Fixes: 6eabce6608d6 tag per Hugo Villeneuve feedback.

Hui Peng (2):
serial: core: fix baud rate fallback in uart_get_baud_rate()
serial: core: reject baud_base values that overflow port->uartclk in

    uart_set_info()
 drivers/tty/serial/serial_core.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
Signature · 1 line
2.47.3