Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Loading

Malformed DNS packets crash FreeRTOS+TCP

Posted by jjr-simiatec on October 7, 2016

While testing a PIC32 port for FreeRTOS+TCP, I've been using Zenmap (part of the Nmap suite) as a quick way of generating a lot of random flavoured packets quickly. After fixing my own code enough to create the illusion of stability, I discovered bad DNS packets can result in 'bad things happening'. This is because the counted byte fields are not checked to see if they go out of bounds while parsing which results in a GPF in extreme cases.

I have patched FreeRTOS_DNS.c to keep track of buffer remaining while parsing progresses. This has at least kept the microcontroller alive against a battery of tests for the last few days.

Are the code modifications useful to anyone, or is this bug report sufficient?

Thanks.


Malformed DNS packets crash FreeRTOS+TCP

Posted by rtel on October 7, 2016

Hi John, thanks for taking the time to report this. I would be grateful if you could attached the patched file to a post so we can investigate further.


Malformed DNS packets crash FreeRTOS+TCP

Posted by jjr-simiatec on October 20, 2016

Apologies for the delay. Please find attached the modified file.

Attachments

FreeRTOS_DNS.c (49099 bytes)

Malformed DNS packets crash FreeRTOS+TCP

Posted by heinbali01 on October 21, 2016

Thanks John. I will check your extra checks on de DNS packets :-)


[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner