Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panic: interface conversion: gopacket.Layer is nil with fragmented packets #683

Closed
top-secrett opened this issue Apr 19, 2024 · 5 comments · Fixed by #691
Closed

panic: interface conversion: gopacket.Layer is nil with fragmented packets #683

top-secrett opened this issue Apr 19, 2024 · 5 comments · Fixed by #691
Labels
bug Something isn't working
Milestone

Comments

@top-secrett
Copy link

Describe the bug
Today we faced DDoS attack and collector constantly failed. Error in attached sreenshot
Version 0.43.0

image

@dmachard dmachard added the bug Something isn't working label Apr 19, 2024
@dmachard
Copy link
Owner

dmachard commented Apr 20, 2024

Crash reproduced in my side! Could you share your config file ?

Thank you for the report.

@dmachard dmachard changed the title panic: interface conversion: gopacket.Layer is nil panic: interface conversion: gopacket.Layer is nil with IPv6 packet Apr 21, 2024
@top-secrett
Copy link
Author

@dmachard

global:
  # If turned on, log some applications messages
  trace:
    # debug informations
    verbose: true

  server-identity: "ns4.***"


  text-format: "localtime id qr rcode queryip responseip family protocol qtype qname answer answercount length-unit aa df tr edns-csubnet tc malformed"
  text-format-delimiter: " | "
  text-format-boundary: "\""

# create your dns collector, please refer bellow to see the list
# of supported collectors, loggers and transformers
multiplexer:
  collectors:
    - name: ns4-col-ipv4
      afpacket-sniffer:
        port: 53
        device: ens192
        chan-buffer-size: 65535
      transforms:
        normalize:
          qname-lowercase: false
          quiet-text: true

    - name: ns4-col-ipv6
      afpacket-sniffer:
        port: 53
        device: ens224
        chan-buffer-size: 65535
      transforms:
        normalize:
          qname-lowercase: false
          quiet-text: true

  loggers:
    - name: ns4-log
      logfile:
        file-path: /var/log/dns/queries.log
        mode: text
        flush-interval: 1
        max-size: 100000000
        max-files: 0

  routes:
    - from: [ ns4-col-ipv4 ]
      to: [ ns4-log ]
    - from: [ ns4-col-ipv6 ]
      to: [ ns4-log ]


@dmachard dmachard changed the title panic: interface conversion: gopacket.Layer is nil with IPv6 packet panic: interface conversion: gopacket.Layer is nil with fragmented packets Apr 22, 2024
@dmachard
Copy link
Owner

dmachard commented Apr 22, 2024

Thanks for the config.

The root cause has been identified , the BPF filter of the sniffer is incorrect with fragmented packets.
I need time to do more tests and push a full fix to support properly fragmented packets.

In the meantime, I can push a quick fix to ignore fragmented packet and avoid the crash, if necessary ?

@top-secrett
Copy link
Author

top-secrett commented Apr 23, 2024

@dmachard It would be great because DDoS is still going on

@dmachard
Copy link
Owner

Quickfix pushed in release v0.44.0-beta1.

@dmachard dmachard mentioned this issue Apr 24, 2024
2 tasks
@dmachard dmachard added this to the v0.44.0 milestone Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants