Skip to content

SIGSEGV when access to /dev/snd/seq is denied #175

@razgithub

Description

@razgithub

Linux here, Arch. My user wasn't part of the 'audio' group, and ALSA denies access to /dev/snd/seq. So this was solved after adding the user to 'audio'. (strangely, it did actually work for a couple days like this -maybe it was through a different API?)

Anyway, it crashed under that situation: SIGSEGV when 'ALSA lib seq_hw.c:540:(snd_seq_hw_open) open /dev/snd/seq failed: Permission denied' happens, in:

snd_seq_poll_descriptors:
endbr64
test $0x1,%cl
je 0x7ffff7b009c0 <snd_seq_poll_descriptors+48>
xor %eax,%eax
test %edx,%edx
je 0x7ffff7b009cb <snd_seq_poll_descriptors+59>
and $0x4,%ecx
mov 0x14(%rdi),%edx
cmp $0x1,%cx
sbb %eax,%eax
mov %edx,(%rsi) <===
and $0xfffffffc,%eax
add $0x2d,%eax
mov %ax,0x4(%rsi)
mov $0x1,%eax
ret
nopl (%rax)
and $0x4,%ecx
je 0x7ffff7b009c9 <snd_seq_poll_descriptors+57>
test %edx,%edx
jne 0x7ffff7b009d0 <snd_seq_poll_descriptors+64>
xor %eax,%eax
ret
nopl 0x0(%rax)
mov 0x14(%rdi),%edx
mov $0x2c,%eax
mov %ax,0x4(%rsi)
mov $0x1,%eax
mov %edx,(%rsi)
ret

Apologies if the disassembly doesn't help. Anyway, I think the case of forbidden access to /dev/snd/seq could be handled more gracefully.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions