Skip to content

buffer overflow bug when run ./pn_dev #562

@lijunqiang123

Description

@lijunqiang123

Hello, The program has a buffer overflow vulnerability when running the program pn_dev. Specifically, the startup command is: ./pn_dev -s qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq (There are 241 q) .

I have analyzed the code p-net/src/ports/linux/sampleapp_main.c and found that it is because when parsing the input parameter -s, the length of the input parameters is not limited. But output_arguments.station_name is defined as an array of length 241. The following is the corresponding source code.
image
image
Looking forward to your reply, thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions