Skip to content

[BUG] Potential null pointer dereference vulnerability #284

@HoshinoStranding

Description

@HoshinoStranding

Hi, I have found a potential null pointer dereference bug in the project and would like to report it to the maintainers. Can you please help me check it? Thank you for your effort and patience!
Below is the execution sequence of the program that may produce null pointer dereference bug.

In the file src/common/cisco_eeprom.c, the function cisco_eeprom_copy calls cisco_eeprom_free at line 553, in which **eeprom->data (dst->data) ** is assigned as NULL. If the function malloc fails at line 555, dst->data will remain NULL (otherwise it will be assigned as a newly malloced space at line 560).

As the image shown below, after step 4、5、6, NULL value may be dereferenced in the file src/common/cisco_eeprom.c at line 592 in the function cisco_eeprom_get_byte.

Image

Thank you very much for reading and I look forward to hearing from you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions