Skip to content

Possible buffer overflow #24

Closed
Closed
@milabs

Description

@milabs

char buf[PATH_MAX];

PATH_MAX is not enough to have as buffer size as it may be the reason of overflow in fgets used below

Probably, it's better to use something like char buf[PATH_MAX + 128] ...

UPDATE:
Here is the kernel part which generates content of /proc/self/maps and there are no explicit limits in line length: https://elixir.bootlin.com/linux/latest/source/fs/proc/task_mmu.c#L300

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions