New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 759756 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Direct-leak in snd_midi_event_new

Project Member Reported by ClusterFuzz, Aug 28 2017

Issue description

Detailed report: https://clusterfuzz.com/testcase?key=6602288012722176

Fuzzer: inferno_layout_test_unmodified
Job Type: linux_lsan_chrome_mp
Platform Id: linux

Crash Type: Direct-leak
Crash Address: 
Crash State:
  snd_midi_event_new
  snd_midi_event_new
  
Sanitizer: address (ASAN)

Regressed: https://clusterfuzz.com/revisions?job=linux_lsan_chrome_mp&range=487800:487821

Reproducer Testcase: https://clusterfuzz.com/download?testcase_id=6602288012722176

Issue filed automatically.

See https://github.com/google/clusterfuzz-tools for more information.
 
Owner: toyoshim@chromium.org
Status: Assigned (was: Untriaged)
Predator could not provide any possible suspects.
Assigning to the concern owner from CL --
https://chromium.googlesource.com/chromium/src/+log/4bfd504d6355e4e01f929e58f0fb89bf02057cbe..782aaff5b06c8bc32730a11dc33a342b0b6463d5?pretty=fuller&n=10000

Suspecting Commit#
https://chromium.googlesource.com/chromium/src/+/6ada1228cab216200b10d43871266639f9db9ac8

@toyoshim -- Could you please look into the issue, kindly re-assign if this is not related to your changes.
Thank You.
Cc: msrchandra@chromium.org
Labels: M-62 Test-Predator-Wrong
Cc: agoode@chromium.org
Components: Blink>WebMIDI
Labels: OS-Chrome
cc: agoode if you have time.
Direct leak of 40 byte(s) in 1 object(s) allocated from:
    #0 0x7fa217d030fa in __interceptor_calloc (/mnt/scratch0/clusterfuzz/slave-bot/builds/chromium-browser-asan_linux-release_4392242b7f59878a2775b4607420a2b37e17ff13/symbolized/release/asan-linux-release-497686/chrome+0x31f70fa)
    #1 0x7fa20f00865f in snd_midi_event_new (/usr/lib/x86_64-linux-gnu/libasound.so.2+0x9d65f)
Indirect leak of 256 byte(s) in 1 object(s) allocated from:
    #0 0x7fa217d02f03 in __interceptor_malloc (/mnt/scratch0/clusterfuzz/slave-bot/builds/chromium-browser-asan_linux-release_4392242b7f59878a2775b4607420a2b37e17ff13/symbolized/release/asan-linux-release-497686/chrome+0x31f6f03)
    #1 0x7fa20f008697 in snd_midi_event_new (/usr/lib/x86_64-linux-gnu/libasound.so.2+0x9d697)

256 bytes indicates this will be one at line 860, that uses kSendBufferSize.
There is a 'return' path there, and probably it would be better to use ScopedSndMidiEvent?
Status: Started (was: Assigned)
Project Member

Comment 6 by bugdroid1@chromium.org, Sep 1 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0c0059c250e3b6c3114566c64397ef37ca961a60

commit 0c0059c250e3b6c3114566c64397ef37ca961a60
Author: Takashi Toyoshima <toyoshim@chromium.org>
Date: Fri Sep 01 04:59:51 2017

MidiManagerAlsa: memory leak fix of snd_midi_event_t

There was an error path that caused memory leaks of snd_midi_event_t.
This patch enforces all code path to use ScopedSndMidiEventPtr.

Bug:  759756 
Change-Id: Icc2f85fccc66ad9714af18ed5bd90c7f009f4dbb
Reviewed-on: https://chromium-review.googlesource.com/643030
Reviewed-by: Adam Goode <agoode@chromium.org>
Commit-Queue: Takashi Toyoshima <toyoshim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#499133}
[modify] https://crrev.com/0c0059c250e3b6c3114566c64397ef37ca961a60/media/midi/midi_manager_alsa.cc
[modify] https://crrev.com/0c0059c250e3b6c3114566c64397ef37ca961a60/media/midi/midi_manager_alsa.h

Status: Fixed (was: Started)
Project Member

Comment 8 by ClusterFuzz, Sep 2 2017

ClusterFuzz has detected this issue as fixed in range 499123:499135.

Detailed report: https://clusterfuzz.com/testcase?key=6602288012722176

Fuzzer: inferno_layout_test_unmodified
Job Type: linux_lsan_chrome_mp
Platform Id: linux

Crash Type: Direct-leak
Crash Address: 
Crash State:
  snd_midi_event_new
  snd_midi_event_new
  
Sanitizer: address (ASAN)

Regressed: https://clusterfuzz.com/revisions?job=linux_lsan_chrome_mp&range=487800:487821
Fixed: https://clusterfuzz.com/revisions?job=linux_lsan_chrome_mp&range=499123:499135

Reproducer Testcase: https://clusterfuzz.com/download?testcase_id=6602288012722176

See https://github.com/google/clusterfuzz-tools for more information.

If you suspect that the result above is incorrect, try re-doing that job on the test case report page.
Project Member

Comment 9 by ClusterFuzz, Sep 2 2017

Labels: ClusterFuzz-Verified
Status: Verified (was: Fixed)
ClusterFuzz testcase 6602288012722176 is verified as fixed, so closing issue as verified.

If this is incorrect, please add ClusterFuzz-Wrong label and re-open the issue.

Sign in to add a comment