Skip to content

[coreMQTT-Agent] freertos_command_pool.c: Instead allocating memory, only a pointer is provided to dequeue command (CA-357) #241

@MastermindPanda

Description

@MastermindPanda

Checklist

  • Checked the issue tracker for similar issues to ensure this is not a duplicate
  • Read the documentation to confirm the issue is not addressed there and your configuration is set correctly
  • Tested with the latest version to ensure the issue hasn't been fixed

How often does this bug occurs?

always

Expected behavior

freertos_command_pool.c uses commandStructurePool to store messages.

Agent_GetCommand and,Agent_ReleaseCommand should be used for storage handling.

Actual behavior (suspected bug)

In Agent_GetCommand:
A pointer is created and provided to Agent_MessageReceive which internally calls xQueueReceive. This function expects a memory to be provided.

However, it's just a pointer, where data is written to, basically a buffer overflow.

Error logs or terminal output

Steps to reproduce the behavior

Analyse code and read doxygen description of Agent_MessageReceive as well as xQueueReceive.

Project release version

202406.01-LTS

System architecture

Intel/AMD 64-bit (modern PC, older Mac)

Operating system

Windows

Operating system version

Windows 10

Shell

PowerShell

Additional context

commandStructurePool is just used in the init.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions