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

System crash on mdns TXT query (IDFGH-2035) #4224

Closed
eespi opened this issue Oct 21, 2019 · 1 comment
Closed

System crash on mdns TXT query (IDFGH-2035) #4224

eespi opened this issue Oct 21, 2019 · 1 comment

Comments

@eespi
Copy link

eespi commented Oct 21, 2019

Environment

  • IDF version: v3.3-71-g46b12a5
  • Build System: Make
  • Compiler version: 1.22.0-80-g6c4433a
  • Operating System: Linux
  • Power Supply: USB

Problem Description

System crashes on reception on mdns TXT query, by accessing a NULL pointer to a struct.
Fuction _mdns_append_txt_record assignes str[1] = service->service; but service is NULL.

Expected Behavior

Device should not crash

Actual Behavior

System reset

Steps to repropduce

  1. Configure, compile and run mdns example found at examples/protocols/mdns
  2. Download Service Browser app for Android https://play.google.com/store/apps/details?id=com.druk.servicebrowser
  3. Scan network for _http._tcp service and tap
  4. Tap World Wide Web HTTP
  5. Tap on ESP32-WebServer
  6. System crash on ESP32

Code to reproduce this issue

Debug Logs

RX[0][0]: From: 192.168.1.100:5353, To: 224.0.0.251, Packet[222790]: 
    Q: esp32-mdns-EF4A18...local. TXT IN

Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.
Core 0 register dump:
PC      : 0x400d63eb  PS      : 0x00060a30  A0      : 0x800d6c24  A1      : 0x3ffbe800  
0x400d63eb: _mdns_append_txt_record at /media/paolo/Data/working/FW/esp32/esp-idf/components/mdns/mdns.c:4712

A2      : 0x3ffb3edc  A3      : 0x3ffbe8a0  A4      : 0x00000000  A5      : 0x00000001  
A6      : 0x00000000  A7      : 0xff000000  A8      : 0x800d63e8  A9      : 0x3ffbe7e0  
A10     : 0x3ffbec50  A11     : 0x00000004  A12     : 0x3ffbe7b4  A13     : 0x3ffae918  
A14     : 0x00000000  A15     : 0x00000000  SAR     : 0x00000004  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x00000004  LBEG    : 0x400014fd  LEND    : 0x4000150d  LCOUNT  : 0xffffffff  

ELF file SHA256: ada1b418cc11f7ee102bb8b5e85d6cfe241b921b956058a6e0d412c1a6b6fa05

Backtrace: 0x400d63eb:0x3ffbe800 0x400d6c21:0x3ffbe850 0x400d7f30:0x3ffbe890 0x400d845d:0x3ffbe8e0 0x400d9528:0x3ffbe910 0x400d98df:0x3ffbe9d0 0x400d9936:0x3ffbea10 0x4008c2e1:0x3ffbea40
0x400d63eb: _mdns_append_txt_record at /media/paolo/Data/working/FW/esp32/esp-idf/components/mdns/mdns.c

Other items if possible

@github-actions github-actions bot changed the title System crash on mdns TXT query System crash on mdns TXT query (IDFGH-2035) Oct 21, 2019
@ESP-Marius
Copy link
Collaborator

Thank you for reporting the issue. This has been fixed in our internal master branch now.

@igrr igrr closed this as completed in 3d11700 Oct 26, 2019
espressif-bot pushed a commit that referenced this issue Nov 19, 2019
Receiving TXT, PTR, SDPTR and SRV record type queries would crash the application if the hostname
 was used as instance name.

Closes #4224
espressif-bot pushed a commit that referenced this issue Nov 19, 2019
Receiving TXT, PTR, SDPTR and SRV record type queries would crash the application if the hostname
 was used as instance name.

Closes #4224
espressif-bot pushed a commit that referenced this issue Dec 10, 2019
Receiving TXT, PTR, SDPTR and SRV record type queries would crash the application if the hostname
 was used as instance name.

Closes #4224
espressif-bot pushed a commit that referenced this issue Dec 10, 2019
Receiving TXT, PTR, SDPTR and SRV record type queries would crash the application if the hostname
 was used as instance name.

Closes #4224
0xFEEDC0DE64 pushed a commit to 0xFEEDC0DE64/esp-idf that referenced this issue May 5, 2021
david-cermak pushed a commit to david-cermak/esp-protocols that referenced this issue Mar 24, 2022
Receiving TXT, PTR, SDPTR and SRV record type queries would crash the application if the hostname
 was used as instance name.

Closes espressif/esp-idf#4224


* Original commit: espressif/esp-idf@3d11700
gabsuren pushed a commit to gabsuren/esp-protocols-1 that referenced this issue Mar 25, 2022
Receiving TXT, PTR, SDPTR and SRV record type queries would crash the application if the hostname
 was used as instance name.

Closes espressif/esp-idf#4224


* Original commit: espressif/esp-idf@3d11700
gabsuren pushed a commit to gabsuren/esp-protocols-1 that referenced this issue Apr 8, 2022
Receiving TXT, PTR, SDPTR and SRV record type queries would crash the application if the hostname
 was used as instance name.

Closes espressif/esp-idf#4224


* Original commit: espressif/esp-idf@3d11700
gabsuren pushed a commit to gabsuren/esp-protocols-1 that referenced this issue May 17, 2022
Receiving TXT, PTR, SDPTR and SRV record type queries would crash the application if the hostname
 was used as instance name.

Closes espressif/esp-idf#4224


* Original commit: espressif/esp-idf@3d11700
gabsuren pushed a commit to gabsuren/esp-protocols-1 that referenced this issue May 27, 2022
Receiving TXT, PTR, SDPTR and SRV record type queries would crash the application if the hostname
 was used as instance name.

Closes espressif/esp-idf#4224


* Original commit: espressif/esp-idf@3d11700
gabsuren pushed a commit to gabsuren/esp-protocols-1 that referenced this issue May 27, 2022
Receiving TXT, PTR, SDPTR and SRV record type queries would crash the application if the hostname
 was used as instance name.

Closes espressif/esp-idf#4224


* Original commit: espressif/esp-idf@3d11700
gabsuren pushed a commit to gabsuren/esp-protocols-1 that referenced this issue May 27, 2022
Receiving TXT, PTR, SDPTR and SRV record type queries would crash the application if the hostname
 was used as instance name.

Closes espressif/esp-idf#4224


* Original commit: espressif/esp-idf@3d11700
0xFEEDC0DE64 pushed a commit to 0xFEEDC0DE64/esp-protocols that referenced this issue Jun 30, 2022
Receiving TXT, PTR, SDPTR and SRV record type queries would crash the application if the hostname
 was used as instance name.

Closes espressif/esp-idf#4224


* Original commit: espressif/esp-idf@3d11700
euripedesrocha pushed a commit to euripedesrocha/esp-protocols that referenced this issue Oct 17, 2022
Receiving TXT, PTR, SDPTR and SRV record type queries would crash the application if the hostname
 was used as instance name.

Closes espressif/esp-idf#4224


* Original commit: espressif/esp-idf@3d11700
kyvaith pushed a commit to kyvaith/mdns that referenced this issue Oct 4, 2024
Receiving TXT, PTR, SDPTR and SRV record type queries would crash the application if the hostname
 was used as instance name.

Closes espressif/esp-idf#4224


* Original commit: espressif/esp-idf@3d11700
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants