Comments (3)
Hi,
I had a look and it seems that juniper has an exception in the way the plugins works with regard to the extra buffer in question: tcpreplay works with the assumption that there only ever is a single link layer plugin which is mostly true except here: Juniper has a special call to tcpedit_dlt_copy_decoder_state()
which causes the ctx and subctx to share a reference to the decoded_extra
buffer, and the double call through the backtrace as said in this description indeed causes the issue.
I also note that the plugin architecture is quite nice and should absolutely allow juniper to work as it does. I mean it would be a shame to break it IMHO.
Since each plugin is working with the assumption that it owns the decoded_extra
buffer, I suggest to just give each one its own. That would cost a bit more, but not significantly so, and it would also enable the ability to rewrite one link layer into another.
I won't have much time to work on this next month, but I'm willing to work on this after if you want.
Also, this CVE does not seem that bad to me, but if I'm wrong I believe you could use 5ad9d1d701e644ed5b8821456e31acf2e72920c to work around this issue safely.
from tcpreplay.
@fklassen, it seems that somehow freeing of sub-contexts actually frees something that gets freed again (not that I really understand the code). This particular plugin is calling these sub-context de-allocations, which then get called again.
Are sub-contexts copies of contexts and setting pointers of allocated memory to NULL in these copies isn't reflected in the originals, causing double free?
from tcpreplay.
It looks this got CVE-2023-4256 assigned.
from tcpreplay.
Related Issues (20)
- [Bug] tcpreplay-edit recomputes IPv4 checksums unnecessarily
- [Bug]tcprewrite cannot modify the MAC address in ipv6 packets on version 4.4.2 HOT 2
- [Bug] Tcprewrite does not rewrite the contents of ICMPv6 error messages
- [Feature] implement AF_XDF socket extension HOT 1
- [Bug] NULL Pointer Dereference in mask_cidr6 at cidr.c:228
- [Bug] Is it feasible to complete the TCP handshake by replaying SYN+ACK using tcpliveplay? HOT 1
- [Bug] Possible bug on tcprewrite version 4.4.4 for Ethernet layer
- [Bug] Infinite loop in tcprewrite at get.c:569 HOT 1
- [Bug] tcpreplay on Debian 12 does not seem to work on tap interfaces
- [Bug] Packets slowly drift further and further randomly when played or sent using tcpreplay HOT 1
- [Bug] tcprewrite fails to change addresses for ipv6 fragment packets HOT 2
- tcprewrite - tcprewrite does not alter output file udp multicast HOT 6
- Fatal Error: failed to open device ens1f1: Failure accessing netmap. HOT 3
- Warning: Unable to process unsupported DLT type: Ethernet (0x1)
- [Bug] Heap overflow in csum_replace4() (reopen) HOT 1
- [Feature] GitHub Template for pull requests HOT 1
- [Bug] tcprewrite provides incorrect checksum for certain ipv4 packets HOT 2
- `tcpreplay-edit` incorrectly rewrites layer 3 length field to include Ethernet padding HOT 5
- [Bug] tcprewrite provides incorrect checksum for certain ipv4 packets
- [Bug] Double-free in tcpreplay's tcprewrite utility HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tcpreplay.