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

Error with SetFieldValue #55

Open
AcaDemIQ opened this issue Feb 14, 2018 · 7 comments
Open

Error with SetFieldValue #55

AcaDemIQ opened this issue Feb 14, 2018 · 7 comments

Comments

@AcaDemIQ
Copy link

Hello,
Program SafeQ Client used this library, and I've got Program received signal SIGSEGV, Segmentation fault. 0x0000000000405057 in void Crafter::Layer::SetFieldValue<unsigned short>(unsigned long, unsigned short) ()

#0  0x0000000000405057 in void Crafter::Layer::SetFieldValue<unsigned short>(unsigned long, unsigned short) ()
#1  0x00007ffff7bb78e7 in Crafter::ICMPv6Layer::SetCheckSum (value=<optimized out>, this=0x7fffffffc830) at crafter/Protocols/ICMPv6Layer.h:62
#2  Crafter::ICMPv6::ICMPv6 (this=0x7fffffffc830) at crafter/Protocols/ICMPv6Constructor.cpp:44
#3  0x00007ffff7b78abf in Crafter::InitCrafter () at crafter/InitCrafter.cpp:33
#4  0x00007ffff7b6c75a in Crafter::Protocol::Protocol (this=0x7ffff7dd6000 <Crafter::Protocol::ProtoFactory>) at crafter/Layer.h:376
#5  __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at crafter/Layer.cpp:39
#6  _GLOBAL__sub_I_Layer.cpp(void) () at crafter/Layer.cpp:483
#7  0x00007ffff7de76ba in call_init (l=<optimized out>, argc=argc@entry=1, argv=argv@entry=0x7fffffffe658, env=env@entry=0x7fffffffe668) at dl-init.c:72
#8  0x00007ffff7de77cb in call_init (env=0x7fffffffe668, argv=0x7fffffffe658, argc=1, l=<optimized out>) at dl-init.c:30
#9  _dl_init (main_map=0x7ffff7ffe168, argc=1, argv=0x7fffffffe658, env=0x7fffffffe668) at dl-init.c:120
#10 0x00007ffff7dd7c6a in _dl_start_user () from /lib64/ld-linux-x86-64.so.2
#11 0x0000000000000001 in ?? ()
#12 0x00007fffffffe870 in ?? ()
#13 0x0000000000000000 in ?? ()

I tried disable IPv6 object init in CraftInit.cpp, but this problem was also in IP object.

Where is the problem?

@oliviertilmans
Copy link
Collaborator

Hi,

I'll look into this ASAP. can you let me know the revision of libcrafter that you are using ? (i.e., the output of git rev-parse HEAD)

@oliviertilmans
Copy link
Collaborator

Beside the git revision you are using, could you describe how you came to that particular stack trace ? Maybe provide some example to reproduce it ?

Thanks

@AcaDemIQ
Copy link
Author

It's work with CentOS, but not in Ubuntu/Linux Mint. Version of Libcrafter is 0.0.2, but problem with all versions.

Thanks,
Aleksey.

@AcaDemIQ
Copy link
Author

I compiled library ver. 0.3.

@oliviertilmans
Copy link
Collaborator

I compiled library ver. 0.3.

Do you mean the latest git master revision or the last tag?

Could you describe what you are doing when getting this crash? I.e. what are those call_init() functions? Are you calling InitCrafter() multiple times?

@AcaDemIQ
Copy link
Author

Year, I use last tag.
I just used SafeQ Client on Ubuntu system, but I haven't any problems with CentOS system + libcrafter.

@oliviertilmans
Copy link
Collaborator

Could you try the latest master revision ?
0.2/0.3 are several years old, and sadly the backtrace you provided not particularly helpful. Do you know how SafeQ client uses libcrafter?

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