re: serial: core: Prevent unsafe uart port access, part 3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Peter Hurley,

This is a semi-automatic email about new static checker warnings.

The patch af224ca2df29: "serial: core: Prevent unsafe uart port 
access, part 3" from Apr 9, 2016, leads to the following Smatch 
complaint:

drivers/tty/serial/serial_core.c:284 uart_shutdown()
	 error: we previously assumed 'uport' could be null (see line 280)

drivers/tty/serial/serial_core.c
   279			 */
   280			if (uport && uart_console(uport) && tty)
                            ^^^^^
Patch adds new check for NULL.

   281				uport->cons->cflag = tty->termios.c_cflag;
   282	
   283			if (!tty || C_HUPCL(tty))
   284				uart_clear_mctrl(uport, TIOCM_DTR | TIOCM_RTS);
                                                 ^^^^^
Unchecked dereference (inside function call).

   285	
   286			uart_port_shutdown(port);

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux