[riot-commits] [RIOT-OS/RIOT] 5cb904: gnrc_sixlowpan_nd: fixed crash on gnrc_sixlowpan_n...

Martine Lenders authmillenon at gmail.com
Thu Jan 7 03:38:14 CET 2016


  Branch: refs/heads/master
  Home:   https://github.com/RIOT-OS/RIOT
  Commit: 5cb904b57e0cbcb84ffdf036ab3ad37ad7431ad3
      https://github.com/RIOT-OS/RIOT/commit/5cb904b57e0cbcb84ffdf036ab3ad37ad7431ad3
  Author: Yonezawa-T2 <Yonezawa-T2 at mail.dnp.co.jp>
  Date:   2016-01-07 (Thu, 07 Jan 2016)

  Changed paths:
    M sys/net/gnrc/network_layer/sixlowpan/nd/gnrc_sixlowpan_nd.c

  Log Message:
  -----------
  gnrc_sixlowpan_nd: fixed crash on gnrc_sixlowpan_nd_next_hop_l2addr.

When `gnrc_ndp_node_next_hop_l2addr` cannot resolve L2 address, it creates a
temporary neighbor cache entry with interface `KERNEL_PID_UNDEF` (unless the
interface is already known) to send a neighbor solicitation. When another packet
directed to the same address is going to sent before receiving a neighbor
advertisement, `gnrc_sixlowpan_nd_next_hop_l2addr` gets the temporary neighbor
cache entry and calls `gnrc_ipv6_netif_get` with `KERNEL_PID_UNDEF`, resulting
get a `NULL`. We must check `NULL` before dereference it.

FYI, both `gnrc_ndp_node_next_hop_l2addr` and
`gnrc_sixlowpan_nd_next_hop_l2addr` are enabled when
`gnrc_sixlowpan_border_router_default` module is enabled with `GNRC_NETIF_NUMOF`
is greater than 1:

gnrc_sixlowpan_border_router_default
→ gnrc_ipv6_router_default
→ gnrc_ndp_router (if GNRC_NETIF_NUMOF > 1)
→ gnrc_ndp_node
→ gnrc_ndp_node_next_hop_l2addr is called from _next_hop_l2addr

gnrc_sixlowpan_border_router_default
→ gnrc_sixlowpan_nd_border_router
→ gnrc_sixlowpan_nd_router
→ gnrc_sixlowpan_nd
→ gnrc_sixlowpan_nd_next_hop_l2addr is called from _next_hop_l2addr


  Commit: 542e045bba614e5081e2802b17529a1fa227dd7f
      https://github.com/RIOT-OS/RIOT/commit/542e045bba614e5081e2802b17529a1fa227dd7f
  Author: Yonezawa-T2 <Yonezawa-T2 at mail.dnp.co.jp>
  Date:   2016-01-07 (Thu, 07 Jan 2016)

  Changed paths:
    M sys/include/net/gnrc/ipv6/netif.h
    M sys/net/gnrc/network_layer/ipv6/netif/gnrc_ipv6_netif.c
    M sys/net/gnrc/routing/rpl/gnrc_rpl_control_messages.c

  Log Message:
  -----------
  gnrc_ipv6_netif: fixed crash when ENABLE_DEBUG is 1.

When ENABLE_DEBUG is 1, `out` is dereferenced unconditionally, but
`_parse_options` in `gnrc_rpl_control_messages.c` calls it with NULL.

Clarified `out` must not NULL and fixed `_parse_options`.


  Commit: c9c83c7dc7a970ae342d0a461c9e8f9e19fca5a9
      https://github.com/RIOT-OS/RIOT/commit/c9c83c7dc7a970ae342d0a461c9e8f9e19fca5a9
  Author: Yonezawa-T2 <Yonezawa-T2 at mail.dnp.co.jp>
  Date:   2016-01-07 (Thu, 07 Jan 2016)

  Changed paths:
    M sys/net/gnrc/network_layer/ipv6/nc/gnrc_ipv6_nc.c

  Log Message:
  -----------
  nc: cancel timer set by `gnrc_ndp_rtr_sol_handle` in `gnrc_ipv6_nc_remove`.


  Commit: cf35763584380dd697b7c403055d230af8915b76
      https://github.com/RIOT-OS/RIOT/commit/cf35763584380dd697b7c403055d230af8915b76
  Author: Yonezawa-T2 <Yonezawa-T2 at mail.dnp.co.jp>
  Date:   2016-01-07 (Thu, 07 Jan 2016)

  Changed paths:
    M sys/net/network_layer/fib/fib.c

  Log Message:
  -----------
  fib: add debug outputs


  Commit: 94e4a08f45c9907bf2c10768352c4822c22f505a
      https://github.com/RIOT-OS/RIOT/commit/94e4a08f45c9907bf2c10768352c4822c22f505a
  Author: Martine Lenders <authmillenon at gmail.com>
  Date:   2016-01-07 (Thu, 07 Jan 2016)

  Changed paths:
    M sys/include/net/gnrc/ipv6/netif.h
    M sys/net/gnrc/network_layer/ipv6/nc/gnrc_ipv6_nc.c
    M sys/net/gnrc/network_layer/ipv6/netif/gnrc_ipv6_netif.c
    M sys/net/gnrc/network_layer/sixlowpan/nd/gnrc_sixlowpan_nd.c
    M sys/net/gnrc/routing/rpl/gnrc_rpl_control_messages.c
    M sys/net/network_layer/fib/fib.c

  Log Message:
  -----------
  Merge pull request #4447 from Yonezawa-T2/fix_gnrc_bugs

fixes several bugs on GNRC network stack


Compare: https://github.com/RIOT-OS/RIOT/compare/6a28814cf98d...94e4a08f45c9


More information about the commits mailing list