Wireshark-dev: [Wireshark-dev] Re: Bug in packet-sip.c: Record Route header not dissected
From: wireshark <wireshark@xxxxxx>
Date: Thu, 2 Jul 2026 05:15:39 +0000
Hi Jaap, Thank you for fixing this, i found the MR and see you've improved the whole code block. Best regards, Wesley ________________________________ From: Jaap Keuter <jaap.keuter@xxxxxxxxx> Sent: Wednesday, July 1, 2026 9:40:14 PM To: Developer support list for Wireshark Cc: wireshark Subject: Re: [Wireshark-dev] Bug in packet-sip.c: Record Route header not dissected Let op: Deze e-mail is van een externe afzender. Klik alleen op links en open bijlagen als je de afzender vertrouwt. … And it’s already fixed. > On 29 Jun 2026, at 13:32, wireshark via Wireshark-dev <wireshark-dev@xxxxxxxxxxxxx> wrote: > > Hi All, > > > I found a bug in the SIP dissector, i don't have a gitlab account so i hope it's okay for you if i send it here on the mailing list. > > > Problem: > > In the SIP dissector the "Record-Route" header is not properly dissected anymore. Previous versions of wireshark dissected the header to it's components (similar to all other SIP headers), but the current master doesn't. The Record-Route header is displayed, the subtree with the separate components of this header is not available anymore. > > > How to reproduce: > > The issue can be seen in the DTMFsipinfo.pcap sample capture on the wiki: > > https://wiki.wireshark.org/uploads/__moin_import__/attachments/SampleCaptures/DTMFsipinfo.pcap > > Go to Frame 4 -> Session Initiation Protocol (200) -> Message Header -> Record Route > > Using the display filter "sip.Record-Route" brings up more similar issues. > > > Cause: > > I think the problem comes from line 2506 of packet-sip.c, function dissect_sip_route_header: > > https://gitlab.com/wireshark/wireshark/-/blob/master/epan/dissectors/packet-sip.c#L2506 > > On this line ¤t_offset is used for the end_offset which is modified by the call to tvb_find_uint8_length and this causes the current_offset to change to the second to last character in the header. Because of that all other analysis of the header (in dissect_ip_addr_or_addr_spec) doesn't find anything because it just searches in the last character. > > > Fix: > > As far as i can see we don't need the value returned by tvb_find_uint8_length via end_offset so we can use a NULL pointer. The tvb_find_uint8_length checks this and doesn't make modifications if it's NULL. The attached patch applies this fix, it should apply cleanly to the current master. After recompiling the Record-Route header is properly dissected again. > > I don't have any SIP Frames with a "," in the Record-Route header so i can't validate the outcome of that, because of this i'm not 100% sure this is the correct way to fix this. > > > Best regards, > > Wesley > > ________________________________ > Dit bericht kan informatie bevatten die niet voor u is bestemd. Indien u niet de geadresseerde bent of dit bericht abusievelijk aan u is toegezonden, wordt u verzocht dat aan de afzender te melden en het bericht te verwijderen. De Staat aanvaardt geen aansprakelijkheid voor schade, van welke aard ook, die verband houdt met risico's verbonden aan het elektronisch verzenden van berichten. > > Ministerie van Justitie en Veiligheid > > This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. The State accepts no liability for damage of any kind resulting from the risks inherent in the electronic transmission of messages. > > Ministry of Justice and Security > <sip-record-route-fix.patch>_______________________________________________ > Wireshark-dev mailing list -- wireshark-dev@xxxxxxxxxxxxx > To unsubscribe send an email to wireshark-dev-leave@xxxxxxxxxxxxx ________________________________ Dit bericht kan informatie bevatten die niet voor u is bestemd. Indien u niet de geadresseerde bent of dit bericht abusievelijk aan u is toegezonden, wordt u verzocht dat aan de afzender te melden en het bericht te verwijderen. De Staat aanvaardt geen aansprakelijkheid voor schade, van welke aard ook, die verband houdt met risico's verbonden aan het elektronisch verzenden van berichten. Ministerie van Justitie en Veiligheid This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. The State accepts no liability for damage of any kind resulting from the risks inherent in the electronic transmission of messages. Ministry of Justice and Security ity y
Attachment:
digital-signature.txt
Description: PGP signature
- References:
- Prev by Date: [Wireshark-dev] Re: Bug in packet-sip.c: Record Route header not dissected
- Next by Date: [Wireshark-dev] Wireshark 5.0.0 and Stratoshark 1.0.0 release schedule
- Previous by thread: [Wireshark-dev] Re: Bug in packet-sip.c: Record Route header not dissected
- Next by thread: [Wireshark-dev] Wireshark 5.0.0 and Stratoshark 1.0.0 release schedule
- Index(es):