-
Notifications
You must be signed in to change notification settings - Fork 213
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
2.6.52-dev1 segfault twice per day #421
Comments
@AnatoliChe Thank you for reportin git. Can you please test with OSW 2.6.52rc1? If the issue still occurs, can you please post your ipsec.conf |
With rc1 I have much more interesting error.
config gdb pluto -c core-pluto.16268.kvpzv.1576778254 (gdb) bt (gdb) frame 0 (gdb) print in_key |
disass /m We have This is like to some kind of magic :-D |
I switched ipsec from aes128-sha1 to aes_ctr160-sha1 and do not have segfault already 3 days. |
Do you compile with nss? Nss is an active maintained and certified crypto library, unlike the mostly abandoned openswan native crypto.
…Sent from my iPhone
On Dec 23, 2019, at 02:36, Anatoli ***@***.***> wrote:
I switched ipsec from aes128-sha1 to aes_ctr160-sha1 and do not have segfault already 3 days.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
No it was without nss. |
On Mon, 23 Dec 2019, Anatoli wrote:
No it was without nss.
I understand nss is future.
But it's interesting, why in some cases of network problems in_key = (const
unsigned char *) 0x0
I don't know. That code hasn't been maintained since the libreswan fork
in 2011. libreswan at the time removed all non-nss crypto code, so I
have no more experience with the openswan ancient crypto code.
|
On Mon, 23 Dec 2019, Anatoli wrote:
libreswan at the time removed all non-nss crypto code
So, it's time clean up LSW from
aes
aes.c
Those are part of the KLIPS kernel module, which is scheduled for
removal in 3.31 (after the current code is released as 3.30)
These files are not used for the userland IKE daemon.
Paul
|
Hi! I'm biting with sigfaults.
openswan 2.6.53-dev1
kernel: : pluto[5028]: segfault at 2f4 ip 000055baaf962800 sp 00007ffe73c97e30 error 4 in pluto[55baaf925000+a3000]
gdb OBJ.linux.x86_64/programs/pluto/pluto -c core-pluto.18393
Core was generated by /usr/local/libexec/ipsec/pluto --nofork --secretsfile /etc/ipsec.secrets --ipse.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 setup_half_ipsec_sa (parent_st=parent_st@entry=0x0, st=st@entry=0x557936554bd0, sr=sr@entry=0x7ffd638d9620, inbound=inbound@entry=1)
at programs/pluto/kernel.c:1718
1718 const char *inbound_str = inbound ? "inbound" : "outbound";
(gdb) bt
#0 setup_half_ipsec_sa (parent_st=parent_st@entry=0x0, st=st@entry=0x557936554bd0, sr=sr@entry=0x7ffd638d9620, inbound=inbound@entry=1)
at programs/pluto/kernel.c:1718
#1 0x0000557935cc6f58 in install_ipsec_sa (parent_st=0x0, st=st@entry=0x557936554bd0, inbound_also=inbound_also@entry=1)
at programs/pluto/kernel.c:3020
#2 0x0000557935cac4f7 in quick_inR1_outI2_cryptotail (r=r@entry=0x7ffd638d9ad0, dh=) at programs/pluto/ikev1_quick.c:2642
#3 0x0000557935cac7be in quick_inR1_outI2_continue (pcrc=0x5579365bbc40, r=0x7ffd638d9ad0, ugh=0x0) at programs/pluto/ikev1_quick.c:2475
#4 0x0000557935cd76af in handle_helper_comm (w=w@entry=0x55793643e3f0) at programs/pluto/pluto_crypt.c:827
#5 0x0000557935cd84bb in pluto_crypto_helper_ready (readfds=readfds@entry=0x7ffd638db180) at programs/pluto/pluto_crypt.c:1101
#6 0x0000557935c9a989 in call_server () at programs/pluto/server.c:798
#7 0x0000557935c84faf in main (argc=, argv=) at programs/pluto/plutomain.c:1134
(gdb) frame 0
#0 setup_half_ipsec_sa (parent_st=parent_st@entry=0x0, st=st@entry=0x557936554bd0, sr=sr@entry=0x7ffd638d9620, inbound=inbound@entry=1)
at programs/pluto/kernel.c:1718
1718 const char *inbound_str = inbound ? "inbound" : "outbound";
(gdb) list
1713 bool outgoing_ref_set = FALSE;
1714 bool incoming_ref_set = FALSE;
1715 IPsecSAref_t refhim = st->st_refhim;
1716 IPsecSAref_t new_refhim = IPSEC_SAREF_NULL;
1717
1718 const char inbound_str = inbound ? "inbound" : "outbound";
1719
1720 / SPIs, saved for spigrouping or undoing, if necessary */
1721 struct kernel_sa
1722 said[EM_MAXRELSPIS],
(gdb) print inbound
$1 = 1
(gdb) frame 1
#1 0x0000557935cc6f58 in install_ipsec_sa (parent_st=0x0, st=st@entry=0x557936554bd0, inbound_also=inbound_also@entry=1)
at programs/pluto/kernel.c:3020
3020 if(!setup_half_ipsec_sa(parent_st, st, sr, TRUE)) {
(gdb) list
3015 }
3016
3017 DBG(DBG_KLIPS, DBG_log("state #%lu: now setting up incoming SA", st->st_serialno));
3018 /* now setup inbound SA */
3019 if(st->st_ref == IPSEC_SAREF_NULL && inbound_also) {
3020 if(!setup_half_ipsec_sa(parent_st, st, sr, TRUE)) {
3021 loglog(RC_LOG_SERIOUS, "state #%lu: failed to setup incoming SA", st->st_serialno);
3022 return FALSE;
3023 }
3024 DBG(DBG_KLIPS, DBG_log("state #%lu: set up incoming SA, ref=%u/%u", st->st_serialno, st->st_ref, st->st_refhim));
(gdb) print st
$2 = (struct state *) 0x557936554bd0
(gdb) print sr
$3 = (struct spd_route *) 0x7ffd638d9620
(gdb) print parent_st
$4 = (struct state *) 0x0
I do not fully understand how
const char *inbound_str = inbound ? "inbound" : "outbound";
eg
const char *inbound_str = 1 ? "inbound" : "outbound";
can cause segfault.
Maybe I should compile with -O0?
The text was updated successfully, but these errors were encountered: