[bug report] batman: potential null dereference in send_packet()

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

 



There was a dereference before check issue introduced in 6a0e9fa88df9:
"Staging: batman-adv: attach each hard-interface to a soft-interface"

   160  static void send_packet(struct forw_packet *forw_packet)
   161  {
   162          struct batman_if *batman_if;
   163          struct net_device *soft_iface = forw_packet->if_incoming->soft_iface;
                                                ^^^^^^^^^^^^^^^^^^^^^^^^

	dereferenced.

   164          struct bat_priv *bat_priv = netdev_priv(soft_iface);
   165          struct batman_packet *batman_packet =
   166                  (struct batman_packet *)(forw_packet->skb->data);
   167          unsigned char directlink = (batman_packet->flags & DIRECTLINK ? 1 : 0);
   168  
   169          if (!forw_packet->if_incoming) {
                     ^^^^^^^^^^^^^^^^^^^^^^^^
	checked.

   170                  pr_err("Error - can't forward packet: incoming iface not "
   171                         "specified\n");
   172                  return;
   173          }

regards,
dan carpenter
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux