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

dlt_jnpr_ether_cleanup: check config before cleanup #851

Merged
merged 1 commit into from
Jun 3, 2024

Conversation

Marsman1996
Copy link
Contributor

Fix #812
The ctx->encoder->config is somehow already cleaned up in dlt_en10mb_cleanup() and set as NULL, so I add a check in dlt_jnpr_ether_cleanup().

(gdb) p & ctx->encoder->config
$1 = (void **) 0x55555559f140
(gdb) watch *0x55555559f140
Hardware watchpoint 2: *0x55555559f140
(gdb) r
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /home/ubuntu178/afgen/tcpreplay/4.4.4/bin_normal/bin/tcprewrite -o /dev/null --dlt=enet --enet-dmac=00:12:13:14:15:16,00:22:33:44:55:66 --enet-smac=00:12:13:14:15:16,00:22:33:44:55:66 -i issue-812
Warning: issue-812 was captured using a snaplen of 50 bytes.  This may mean you have truncated packets.

Hardware watchpoint 2: *0x55555559f140

Old value = <unreadable>
New value = 0
__memset_avx2_unaligned_erms () at ../sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S:203
203     ../sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S: No such file or directory.
(gdb) c
Continuing.

Hardware watchpoint 2: *0x55555559f140

Old value = 0
New value = 1431959872
dlt_en10mb_init (ctx=0x55555559f040) at ../../../code/src/tcpedit/plugins/dlt_en10mb/en10mb.c:114
warning: Source file is more recent than executable.
114         config = (en10mb_config_t *)plugin->config;
(gdb) c
Continuing.

Hardware watchpoint 2: *0x55555559f140

Old value = 1431959872
New value = 0
dlt_en10mb_cleanup (ctx=0x55555559f040) at ../../../code/src/tcpedit/plugins/dlt_en10mb/en10mb.c:151    <- clean up here first
151             plugin->config_size = 0; 

@fklassen fklassen changed the base branch from master to 4.5.0 June 3, 2024 00:36
@fklassen fklassen self-assigned this Jun 3, 2024
@fklassen fklassen added the bug label Jun 3, 2024
@fklassen fklassen merged commit b002ccc into appneta:4.5.0 Jun 3, 2024
3 checks passed
fklassen added a commit that referenced this pull request Jun 4, 2024
Double free was fixed in PRs #711 and #851. This fix applied after these PRs introduces memory leaks.
kraj pushed a commit to YoeDistro/meta-openembedded that referenced this pull request Jul 25, 2024
Add patch to fix tcpreplay CVE-2023-4256
dlt_jnpr_ether_cleanup: check config before cleanup
Links:
appneta/tcpreplay#851
appneta/tcpreplay#813 (comment)

Signed-off-by: Poonam Jadhav <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
daregit pushed a commit to daregit/yocto-combined that referenced this pull request Jul 29, 2024
Add patch to fix tcpreplay CVE-2023-4256
dlt_jnpr_ether_cleanup: check config before cleanup
Links:
appneta/tcpreplay#851
appneta/tcpreplay#813 (comment)

Signed-off-by: Poonam Jadhav <poonam.jadhavkpit.com>
Signed-off-by: Khem Raj <raj.khemgmail.com>
daregit pushed a commit to daregit/yocto-combined that referenced this pull request Jul 30, 2024
Add patch to fix tcpreplay CVE-2023-4256
dlt_jnpr_ether_cleanup: check config before cleanup
Links:
appneta/tcpreplay#851
appneta/tcpreplay#813 (comment)

Signed-off-by: Poonam Jadhav <poonam.jadhavkpit.com>
Signed-off-by: Khem Raj <raj.khemgmail.com>
github-actions bot pushed a commit to Boeing/meta-openembedded-contrib that referenced this pull request Jul 30, 2024
Add patch to fix tcpreplay CVE-2023-4256
dlt_jnpr_ether_cleanup: check config before cleanup
Links:
appneta/tcpreplay#851
appneta/tcpreplay#813 (comment)

Signed-off-by: Poonam Jadhav <[email protected]>
Signed-off-by: Armin Kuster <[email protected]>
daregit pushed a commit to daregit/yocto-combined that referenced this pull request Aug 1, 2024
Add patch to fix tcpreplay CVE-2023-4256
dlt_jnpr_ether_cleanup: check config before cleanup
Links:
appneta/tcpreplay#851
appneta/tcpreplay#813 (comment)

Signed-off-by: Poonam Jadhav <poonam.jadhavkpit.com>
Signed-off-by: Khem Raj <raj.khemgmail.com>
github-actions bot pushed a commit to Boeing/meta-openembedded-contrib that referenced this pull request Aug 3, 2024
Add patch to fix tcpreplay CVE-2023-4256
dlt_jnpr_ether_cleanup: check config before cleanup
Links:
appneta/tcpreplay#851
appneta/tcpreplay#813 (comment)

Signed-off-by: Poonam Jadhav <[email protected]>
Signed-off-by: Armin Kuster <[email protected]>
jpuhlman pushed a commit to MontaVista-OpenSourceTechnology/meta-openembedded that referenced this pull request Aug 5, 2024
Source: meta-openembedded
MR: 158189
Type: Integration
Disposition: Merged from meta-openembedded
ChangeID: e488bc8
Description:

Add patch to fix tcpreplay CVE-2023-4256
dlt_jnpr_ether_cleanup: check config before cleanup
Links:
appneta/tcpreplay#851
appneta/tcpreplay#813 (comment)

Signed-off-by: Poonam Jadhav <[email protected]>
Signed-off-by: Armin Kuster <[email protected]>
Signed-off-by: Jeremy A. Puhlman <[email protected]>
jpuhlman pushed a commit to MontaVista-OpenSourceTechnology/meta-openembedded that referenced this pull request Aug 19, 2024
Source: meta-openembedded
MR: 158406
Type: Integration
Disposition: Merged from meta-openembedded
ChangeID: 4d7c91e
Description:

Add patch to fix tcpreplay CVE-2023-4256
dlt_jnpr_ether_cleanup: check config before cleanup
Links:
appneta/tcpreplay#851
appneta/tcpreplay#813 (comment)

Signed-off-by: Poonam Jadhav <[email protected]>
Signed-off-by: Armin Kuster <[email protected]>
Signed-off-by: Jeremy A. Puhlman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] tcprewrite SEGV plugins/dlt_jnpr_ether/jnpr_ether.c:167 in dlt_jnpr_ether_cleanup
2 participants