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

Martine Lenders authmillenon at gmail.com
Thu Jan 7 04:14:13 CET 2016


  Branch: refs/heads/2015.12-branch
  Home:   https://github.com/RIOT-OS/RIOT
  Commit: f638aec567ae918d1c7994a1bf680ebf35f6bc8d
      https://github.com/RIOT-OS/RIOT/commit/f638aec567ae918d1c7994a1bf680ebf35f6bc8d
  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: c7c76208f3b41b370702e01ed30ccdcf4555eeb7
      https://github.com/RIOT-OS/RIOT/commit/c7c76208f3b41b370702e01ed30ccdcf4555eeb7
  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: 503b982772b300378325c2bb83d0ea8fc6ecd2c4
      https://github.com/RIOT-OS/RIOT/commit/503b982772b300378325c2bb83d0ea8fc6ecd2c4
  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: c4248710e5dcd8817ac3aa34ecdd36d3f490480d
      https://github.com/RIOT-OS/RIOT/commit/c4248710e5dcd8817ac3aa34ecdd36d3f490480d
  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: 33ada0c20250c0e504c7df127f10f4b63dd141ff
      https://github.com/RIOT-OS/RIOT/commit/33ada0c20250c0e504c7df127f10f4b63dd141ff
  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 #4604 from Yonezawa-T2/backport_4447_to_2015.12

fixes several bugs on GNRC network stack


Compare: https://github.com/RIOT-OS/RIOT/compare/0c2deb77038f...33ada0c20250


More information about the commits mailing list