Bug 229378

Summary: crash in in_gif_lookup
Product: Base System Reporter: Takanori Watanabe <takawata>
Component: kernAssignee: Andrey V. Elsukov <ae>
Status: Closed FIXED    
Severity: Affects Only Me CC: ae
Priority: ---    
Version: CURRENT   
Hardware: amd64   
OS: Any   
Attachments:
Description Flags
crash message none

Description Takanori Watanabe freebsd_committer freebsd_triage 2018-06-28 02:50:28 UTC
Created attachment 194697 [details]
crash message

After update to the CURRENT yesterday, system crashes with Null pointer assignment as attach below.

My internet access is on PPPoE with mpd.

Though I don't create gif(4) or gre(4) interfaces, I receive gre packet
from several site.
Comment 1 Andrey V. Elsukov freebsd_committer freebsd_triage 2018-06-28 11:24:29 UTC
Do you have core dump? Can you show the backtrace from kgdb?
Comment 2 commit-hook freebsd_committer freebsd_triage 2018-06-28 11:39:31 UTC
A commit references this bug:

Author: ae
Date: Thu Jun 28 11:39:28 UTC 2018
New revision: 335760
URL: https://svnweb.freebsd.org/changeset/base/335760

Log:
  Add NULL pointer check.

  encap_lookup_t method can be invoked by IP encap subsytem even if none
  of gif/gre/me interfaces are exist. Hash tables are allocated on demand,
  when first interface is created. So, make NULL pointer check before
  doing access to hash table.

  PR:		229378

Changes:
  head/sys/net/if_me.c
  head/sys/netinet/in_gif.c
  head/sys/netinet/ip_gre.c
  head/sys/netinet6/in6_gif.c
  head/sys/netinet6/ip6_gre.c
Comment 3 Andrey V. Elsukov freebsd_committer freebsd_triage 2018-06-28 11:40:30 UTC
I think the problem should be fixed now, thanks!
Comment 4 Takanori Watanabe freebsd_committer freebsd_triage 2018-06-29 03:13:25 UTC
(In reply to Andrey V. Elsukov from comment #3)
Confirmed. Thanks!