Closed Bug 835020 Opened 13 years ago Closed 7 years ago

Skia alloc-dealloc-mismatch [@SkRefCnt::unref()]

Categories

(Core :: Graphics: ImageLib, defect)

x86_64
Linux
defect
Not set
critical

Tracking

()

RESOLVED INVALID

People

(Reporter: posidron, Unassigned)

References

Details

(Keywords: sec-low)

Attachments

(2 files)

Attached file callstack —
First results of the fuzzing farm. I am not sure right now how we treat such type of bugs, therefore I will mark this as s-s. The stacks look false-positive to me but perhaps I am overseeing something. Tested with m-c changeset: 119623:b0dcc10f4768
Attached image testcase —
We got the same result during fuzzing Theora therefore I assume it is not PNG related.
Summary: PNG alloc-dealloc-mismatch [@SkRefCnt::unref()] → Skia alloc-dealloc-mismatch [@SkRefCnt::unref()]
in practice we're /probably/ mapping to the same allocator underneath (jemalloc), but sometimes with different libraries that doesn't happen and then badness ensues.
Keywords: sec-low
FWIW, I see this kind of thing just running the regular test harness under Linux with a new Clang. WARNING: NS_ENSURE_TRUE(compMgr) failed: file /home/ekr/mozilla-central/obj-asan-opt-x86_64-unknown-linux-gnu/xpcom/build/nsComponentManagerUtils.cpp, line 58 ================================================================= ==1933==ERROR: AddressSanitizer: alloc-dealloc-mismatch (malloc vs operator delete) on 0x60200000ce10 #0 0x4266d4 in _ZdlPv ??:0 #1 0x4c02fc in _ZN9__gnu_cxx13new_allocatorISsE10deallocateEPSsm /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/ext/new_allocator.h:98 #2 0x7fcb5e5c7a88 in ~vector /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/stl_vector.h:350 #3 0x7fcb5e47322d in _ZN7mozilla13ShutdownXPCOMEP17nsIServiceManager /home/ekr/mozilla-central/xpcom/build/nsXPComInit.cpp:716 #4 0x4368e0 in ~ScopedXPCOM /home/ekr/mozilla-central/../../../dist/include/testing/TestHarness.h:144 #5 0x43471d in ~MtransportTestUtils /home/ekr/mozilla-central/media/mtransport/test/mtransport_test_utils.h:42 #6 0x7fcb56a9376c in ?? ??:0 0x60200000ce10 is located 0 bytes inside of 8-byte region [0x60200000ce10,0x60200000ce18) allocated by thread T0 here: #0 0x426134 in malloc ??:0 #1 0x7fcb58c5644c in moz_xmalloc /home/ekr/mozilla-central/memory/mozalloc/mozalloc.cpp:54 #2 0x44cd63 in _ZNSt12_Vector_baseISsSaISsEE11_M_allocateEm /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/stl_vector.h:150 #3 0x7fcb5e5c692d in ~basic_string /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/stl_vector.h:840 #4 0x7fcb5e5c78f4 in _ZN11CommandLine4InitEiPKPKc /home/ekr/mozilla-central/ipc/chromium/src/base/command_line.cc:177 #5 0x7fcb5e47223a in NS_InitXPCOM2 /home/ekr/mozilla-central/xpcom/build/nsXPComInit.cpp:441 #6 0x437b23 in ScopedXPCOM /home/ekr/mozilla-central/../../../dist/include/testing/TestHarness.h:111 #7 0x434628 in ScopedXPCOM /home/ekr/mozilla-central/../../../dist/include/testing/TestHarness.h:118 #8 0x7fcb56a9376c in ?? ??:0 ==1933==HINT: if you don't care about these warnings you may set ASAN_OPTIONS=alloc_dealloc_mismatch=0 ==1933==ABORTING ekr@buildbot:~/mozilla-central$
See Also: → 880193
The bug in comment 3 is a different one. Roc mentioned that at least the skia bug should not be security-related, but he also mentioned it should be fixed. It's not a false positive either.
Group: core-security → gfx-core-security
Group: gfx-core-security

This code has evolved so much, this should no longer be a problem.

Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: