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

Bug #489 free after memcpy #497

Merged
merged 1 commit into from
Oct 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
10/18/2018 Version 4.3.0 beta2
- fix issues identifed by Codacy (#493)
- CVE-2018-18408 use-after-free in post_args (#489)
- CVE-2018-18407 heap-buffer-overflow csum_replace4 (#488)
- CVE-2018-17974 heap-buffer-overflow dlt_en10mb_encode (#486)
- CVE-2018-17582 heap-buffer-overflow in get_next_packet (#484)
Expand Down
6 changes: 4 additions & 2 deletions src/tcpbridge.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,9 @@ post_args(_U_ int argc, _U_ char *argv[])
warnx("Unable to get MAC address: %s", sendpacket_geterr(sp));
err(-1, "Please consult the man page for using the -M option.");
}
sendpacket_close(sp);

memcpy(options.intf1_mac, eth_buff, ETHER_ADDR_LEN);
sendpacket_close(sp);
}

if (memcmp(options.intf2_mac, "\00\00\00\00\00\00", ETHER_ADDR_LEN) == 0) {
Expand All @@ -227,8 +228,9 @@ post_args(_U_ int argc, _U_ char *argv[])
warnx("Unable to get MAC address: %s", sendpacket_geterr(sp));
err(-1, "Please consult the man page for using the -M option.");
}
sendpacket_close(sp);

memcpy(options.intf2_mac, eth_buff, ETHER_ADDR_LEN);
sendpacket_close(sp);
}

/*
Expand Down