[lkml]   [2019]   [Dec]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[BUG] ALSA: seq: a possible sleep-in-atomic-context bug in snd_virmidi_dev_receive_event()
The driver may sleep while holding a read lock.
The function call path (from bottom to top) in Linux 4.19 is:

sound/core/seq/seq_memory.c, 96:
    copy_from_user in snd_seq_dump_var_event
sound/core/seq/seq_virmidi.c, 97:
    snd_seq_dump_var_event in snd_virmidi_dev_receive_event
sound/core/seq/seq_virmidi.c, 88:
    _raw_read_lock in snd_virmidi_dev_receive_event

copy_from_user() can sleep at runtime.

I am not sure how to properly fix this possible bug, so I only report it.

This bug is found by a static analysis tool STCheck written by myself.

Best wishes,
Jia-Ju Bai

 \ /
  Last update: 2019-12-17 14:24    [W:0.052 / U:4.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site