Skip to content

Integer overflow in parse of max_ips_to_scan #2838

@dksslq

Description

@dksslq

Describe the bug
Integer overflow in parse of max_ips_to_scan
max_ips_to_scan defined as unsigned int max_ips_to_scan; // Used for Random input (-iR) to specify how in NmapOps.h
but use as ulong o.max_ips_to_scan = strtoul(optarg, &endptr, 10); in nmap.cc

To Reproduce
nmap -iR 2147483647 works fine, nmap -iR 2147483648 parsed 0 target.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions