Mailing List Archive

[Bug 3192] openssh-8.2 & openssl-1.1.1d error: dereferencing pointer to incomplete type Not found struct BIO , bio->num_write
https://bugzilla.mindrot.org/show_bug.cgi?id=3192

cun <cunixc@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED

--- Comment #1 from cun <cunixc@gmail.com> ---
from openssl include inmport error

--
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
openssh-bugs mailing list
openssh-bugs@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-bugs
[Bug 3192] openssh-8.2 & openssl-1.1.1d error: dereferencing pointer to incomplete type Not found struct BIO , bio->num_write [ In reply to ]
https://bugzilla.mindrot.org/show_bug.cgi?id=3192

--- Comment #2 from cun <cunixc@gmail.com> ---
build ok!

--
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
openssh-bugs mailing list
openssh-bugs@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-bugs
[Bug 3192] openssh-8.2 & openssl-1.1.1d error: dereferencing pointer to incomplete type Not found struct BIO , bio->num_write [ In reply to ]
https://bugzilla.mindrot.org/show_bug.cgi?id=3192

Darren Tucker <dtucker@dtucker.net> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |dtucker@dtucker.net

--- Comment #3 from Darren Tucker <dtucker@dtucker.net> ---
What platform, compiler is this, and in particular what configure
options and CFLAGS did you give? I see at least one non-standard
compiler flag.

A quick test with openssh-8.2p1 and openssl-1.1.1d here compiles OK:

$ CFLAGS="-g -O0 -D_FORTIFY_SOURCE=2 -DDEBUG_KEXECDH" ./configure
--with-ssl-dir=/opt/openssl/1.1.1d && make clean && make
[...]
$ ./ssh -V
OpenSSH_8.2p1, OpenSSL 1.1.1d 10 Sep 2019

$ ./configure --with-ssl-dir=/opt/openssl/1.1.1d
--with-cflags=-DDEBUG_KEXECDH && make clean && make
[...]
$./ssh -V
OpenSSH_8.2p1, OpenSSL 1.1.1d 10 Sep 2019

(I also renamed my system openssl include dir, which didn't make a
difference). Is it possible it's picking up includes from a different
version of OpenSSL somewhere in the search path?

> sshkey.c: In function ‘sshkey_parse_private_pem_fileblob’:
> sshkey.c:4625:27: error: dereferencing pointer to incomplete type
> BIO_read(bio, keybuf, bio->num_write);

wait, OpenSSH 8.2p1 doesn't even contain that line of code.

$ curl -s
https://raw.githubusercontent.com/openssh/openssh-portable/V_8_2/sshkey.c
| grep num_write
$

what modifications have you made to the code?

--
You are receiving this mail because:
You are watching someone on the CC list of the bug.
You are watching the assignee of the bug.
_______________________________________________
openssh-bugs mailing list
openssh-bugs@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-bugs
[Bug 3192] openssh-8.2 & openssl-1.1.1d error: dereferencing pointer to incomplete type Not found struct BIO , bio->num_write [ In reply to ]
https://bugzilla.mindrot.org/show_bug.cgi?id=3192

--- Comment #4 from cun <cunixc@gmail.com> ---
yes

edit openssl-compat.c
...
#include "internal/bio_lcl.h"
....

--
You are receiving this mail because:
You are watching someone on the CC list of the bug.
You are watching the assignee of the bug.
_______________________________________________
openssh-bugs mailing list
openssh-bugs@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-bugs
[Bug 3192] openssh-8.2 & openssl-1.1.1d error: dereferencing pointer to incomplete type Not found struct BIO , bio->num_write [ In reply to ]
https://bugzilla.mindrot.org/show_bug.cgi?id=3192

--- Comment #5 from Darren Tucker <dtucker@dtucker.net> ---
(In reply to cun from comment #4)
> yes
>
> edit openssl-compat.c
> ...
> #include "internal/bio_lcl.h"
> ....

that can't be the only change since the line you're reporting errors on
does not exist in the source code that the OpenSSH team ships. AFAICT
the code as shipped by us compiles just fine with OpenSSL 1.1.1d.

--
You are receiving this mail because:
You are watching someone on the CC list of the bug.
You are watching the assignee of the bug.
_______________________________________________
openssh-bugs mailing list
openssh-bugs@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-bugs
[Bug 3192] openssh-8.2 & openssl-1.1.1d error: dereferencing pointer to incomplete type Not found struct BIO , bio->num_write [ In reply to ]
https://bugzilla.mindrot.org/show_bug.cgi?id=3192

Darren Tucker <dtucker@dtucker.net> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |INVALID

--- Comment #6 from Darren Tucker <dtucker@dtucker.net> ---
(In reply to cun from comment #0)
> sshkey.c: In function ‘sshkey_parse_private_pem_fileblob’:
> sshkey.c:4625:27: error: dereferencing pointer to incomplete type
> BIO_read(bio, keybuf, bio->num_write);

In the sshkey.c shipped with OpenSSH 8.2p1,
sshkey_parse_private_pem_fileblob() runs from line 4503 to 4602 and the
code block immediately before the error ends at line 4522. This means
you have added at least 100 lines of code to this file not including
the one with the error. If you change the code and it doesn't work
that's something you need to fix yourself.

--
You are receiving this mail because:
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.
_______________________________________________
openssh-bugs mailing list
openssh-bugs@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-bugs