Datagram Memory Leak [MAJOR]

Bug #1646971 reported by ponyboy837
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Panda3D
Fix Released
Undecided
rdb

Bug Description

While messing with models i tried editing a path in a .bam file. I knew it wouldn't work but it was worth a shot. But soon after did i discover a major memory leak from the assertion error caused by editing the path. This error will consume your PC's memory and not stop in till closed. It's very dangerous and should be addressed immediately as people could abuse this for malicious purposes.

The file that came straight from hell is attached below.

Revision history for this message
ponyboy837 (ponyboy837) wrote :
Revision history for this message
rdb (rdb) wrote :

Yeah, I see it. Strings in .bam are length-prefixed, so by modifying the string but not the length, all the texture fields it is reading got offset, including the one containing the texture image size. So it tries to allocate a ridiculous number of bytes.

It is easy to protect against allocating more than is actually contained within the file, so I'll add a check.

Changed in panda3d:
milestone: none → 1.9.3
status: New → In Progress
assignee: nobody → rdb (rdb)
rdb (rdb)
Changed in panda3d:
status: In Progress → Fix Committed
rdb (rdb)
Changed in panda3d:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.