cesanta / mongoose

Embedded Web Server
https://mongoose.ws
Other
11.13k stars 2.73k forks source link

Security Vulnerability - Action Required: Heap Overflow in your project since the newest version #2876

Closed Crispy-fried-chicken closed 2 months ago

Crispy-fried-chicken commented 2 months ago

Hi, I think your project may be vulnerable to insufficient bounds checking during management of heap memory in the function of pvPortMalloc (size_t xWantedSize) in the file examples/stm32/nucleo-f746zg-cube-freertos/Middlewares/Third_Party/FreeRTOS/Source/portable/MemMang/heap_4.c. It shares similarities to a recent CVE disclosure CVE-2021-32020 in the FreeRTOS.

The source vulnerability information is as follows:

Vulnerability Detail: CVE Identifier: CVE-2021-32020 Description: The kernel in Amazon Web Services FreeRTOS before 10.4.3 has insufficient bounds checking during management of heap memory. Reference: https://nvd.nist.gov/vuln/detail/CVE-2021-32020 Patch: https://github.com/FreeRTOS/FreeRTOS-Kernel/commit/c7a9a01c94987082b223d3e59969ede64363da63

Would you help to check if this bug is true? If it's true, I'd like to open a PR for that if necessary. Thank you for your effort and patience!

cpq commented 2 months ago

@Crispy-fried-chicken heap_4.c is FreeRTOS file, not ours. Is your intention to make a PR against it?

Crispy-fried-chicken commented 2 months ago

@cpq Yes, I've already make a PR which is https://github.com/cesanta/mongoose/pull/2878. Maybe you can review it?

scaprile commented 2 months ago

@Crispy-fried-chicken please do not open several issues for the same subject, #2879

Thanks for your concerns, once again, that is vendor code, just a usage example, not our code.