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

use-of-uninitialized values in print-isakmp.c #848

Open
mcr opened this issue Apr 22, 2020 · 1 comment
Open

use-of-uninitialized values in print-isakmp.c #848

mcr opened this issue Apr 22, 2020 · 1 comment
Assignees

Comments

@mcr
Copy link
Member

mcr commented Apr 22, 2020

need to fix print-isakmp.c. Test case:

$ CC=clang CFLAGS='-fno-omit-frame-pointer -fsanitize=memory -fno-optimize-sibling-calls -fPIC -g3 -ggdb3 -O0' ./configure

$ make -s clean all

$ ./tcpdump -#nvvvv -E "file tests/ikev2pI2-secrets.txt" -r tests/ikev2pI2.pcap 2>&1|m

1) tcpdump-4.9 branch:

reading from file tests/ikev2pI2.pcap, link-type NULL (BSD loopback)
==135139==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x6960c6 in ikev2_ID_print 
...
@mcr mcr self-assigned this Apr 22, 2020
fxlb added a commit to fxlb/tcpdump that referenced this issue Aug 12, 2022
Found with clang, CFLAGS=-fsanitize=memory.

Fix GitHub issues the-tcpdump-group#848 and the-tcpdump-group#849.

The problem is that for some unknown reason the pt buffer is not
initialized after EVP_DecryptUpdate() call, no error, in:

print-esp.c:260:        if (!EVP_DecryptUpdate(ctx, pt, &len, ct, ctlen)) {
fxlb added a commit to fxlb/tcpdump that referenced this issue Aug 12, 2022
Found with clang, CFLAGS=-fsanitize=memory.

Fix GitHub issues the-tcpdump-group#848 and the-tcpdump-group#849.

The problem is that for some unknown reason the pt buffer is not
initialized after EVP_DecryptUpdate() call, no error, in:

print-esp.c:260:        if (!EVP_DecryptUpdate(ctx, pt, &len, ct, ctlen)) {

(cherry picked from commit 47a7e20)
@fxlb
Copy link
Member

fxlb commented Aug 12, 2022

Workaround commited.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants