RTEMS | Review all uart/console driver set_attributes() for B0 handling (#5558)

SHIVAM DEOLANKAR (@D3athSkulll) gitlab at rtems.org
Sat Apr 25 01:43:42 UTC 2026




SHIVAM DEOLANKAR commented: https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5558#note_149041


Inspected the bsps/m68k/ all the bsps here need the fix.

On Reviewing `IntUartSetAttributes()` in **m68k/uC5282** console driver. The function does not check for baud rate 0 and passes it directly to `IntUartSet()`, which may result in divide-by-zero internally. Needs an explicit guard to reject baud rate 0.

Similarly for `IntUartSetAttributes()` in **m68k/mcf5235** console driver. The function does not guard against baud rate 0 and passes it to `IntUartSet()`, which may result in divide-by-zero. This also needs explicit check to reject baud rate 0.

Similar thing is observed for `IntUartSetAttributes()` in **m68k/mcf5329.**

Also reviewing **m68k/av5282** UART driver. The function passes baud rate directly to `IntUartSet()`, where it is used in a division (`clock_speed / (32 * baud)`). If baud is 0, this leads to a definite divide-by-zero. Needs explicit guard in `IntUartSetAttributes()` to reject baud rate 0.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5558#note_149041
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20260425/3658681f/attachment.htm>


More information about the bugs mailing list