Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ndpiReader (nDPI 3.3.0-2716-1810281d) - segmentation fault #997

Closed
0xM1ra1 opened this issue Aug 28, 2020 · 2 comments
Closed

ndpiReader (nDPI 3.3.0-2716-1810281d) - segmentation fault #997

0xM1ra1 opened this issue Aug 28, 2020 · 2 comments

Comments

@0xM1ra1
Copy link

0xM1ra1 commented Aug 28, 2020

Input:
./ndpiReader --version
./ndpiReader --verbose

Output:
[1] 39607 segmentation fault ./ndpiReader --version
[1] 39776 segmentation fault ./ndpiReader --verbose

Program received signal SIGSEGV, Segmentation fault.
__GI_____strtol_l_internal (nptr=0x0, endptr=0x0, base=10, group=0, loc=0x7ffff7cdb4a0 <_nl_global_locale>) at ../stdlib/strtol_l.c:292
292 ../stdlib/strtol_l.c: No such file or directory.
(gdb) bt
#0 __GI_____strtol_l_internal (nptr=0x0, endptr=0x0, base=10, group=0, loc=0x7ffff7cdb4a0 <_nl_global_locale>) at ../stdlib/strtol_l.c:292
#1 0x000055555559a55a in atoi (__nptr=) at /usr/include/stdlib.h:363
#2 parseOptions (argv=0x7fffffffe018, argc=2) at ndpiReader.c:745
#3 main (argc=2, argv=0x7fffffffe018) at ndpiReader.c:3691
(gdb)

Valgrind:
valgrind --tool=memcheck --leak-check=yes ./ndpiReader --version
==41450== Invalid read of size 1
==41450== at 0x4B704E8: ____strtol_l_internal (strtol_l.c:292)
==41450== by 0x14E559: atoi (stdlib.h:363)
==41450== by 0x14E559: parseOptions (ndpiReader.c:745)
==41450== by 0x14E559: main (ndpiReader.c:3691)
==41450== Address 0x0 is not stack'd, malloc'd or (recently) free'd

r2:
r2 ndpiReader
[0x00048a60]> s 0x4B704E8
[0x04b704e8]> pd
0x04b704e8 ff invalid
0x04b704e9 ff invalid
0x04b704ea ff invalid
0x04b704eb ff invalid
0x04b704ec ff invalid
0x04b704ed ff invalid
0x04b704ee ff invalid

But:
input:
./ndpiReader --ver
output:
./ndpiReader: option '--ver' is ambiguous; possibilities: '--verbose' '--version'
Welcome to nDPI 3.3.0-2716-1810281d

@utoni
Copy link
Collaborator

utoni commented Aug 28, 2020

May be fixed with PR #998.

@0xM1ra1
Copy link
Author

0xM1ra1 commented Aug 30, 2020

Yep, fixed, thx)))

@0xM1ra1 0xM1ra1 closed this as completed Aug 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants