ubuntustudio-bugs team mailing list archive
-
ubuntustudio-bugs team
-
Mailing list archive
-
Message #08308
[Bug 1833479] [NEW] libjack-jackd2-0 double close on a failure to connect to jackd which causes crashes in multithreaded programs
*** This bug is a security vulnerability ***
Public security bug reported:
After upgrading to Ubuntu 19.04, I started experiencing sporadic crashes
in kodi when turning my AV receiver on. Ubuntu 19.04 upgraded alsa-
plugins to 1.1.8. For alsa-plugins >= 1.1.8, the ALSA jack plugin is
enabled by default in /etc/alsa/conf.d/50-jack.conf.
The crashes are caused by a race condition when kodi's audio engine
thread is enumerating the ALSA sound devices, and the udev thread is
enumerating the udev devices triggered by the sound device add from
turning the AVR on.
When enumering the ALSA jack plugin device, it tries to connect to
connect to jackd. Since I don't have jackd installed, it fails to
connect. libjack closes the socket on error, and then closes it again in
it's cleanup code. Since it's closing the same file descriptor twice, it
interacts with other threads that have potentially opened file
descriptors, and causes the crash.
This same bug could potentially affect other multithreaded programs that
enumerate ALSA devices.
Fix committed upstream:
https://github.com/jackaudio/jack2/commit/dad4b5702782eef3bd66e3c3f4fefaaae3571208
** Affects: jackd2 (Ubuntu)
Importance: Undecided
Status: New
** Affects: jackd2 (Debian)
Importance: Undecided
Status: New
** Bug watch added: github.com/xbmc/xbmc/issues #16258
https://github.com/xbmc/xbmc/issues/16258
--
You received this bug notification because you are a member of Ubuntu
Studio Bugs, which is subscribed to jackd2 in Ubuntu.
Matching subscriptions: ubuntustudio-bugs: jackd2
https://bugs.launchpad.net/bugs/1833479
Title:
libjack-jackd2-0 double close on a failure to connect to jackd which
causes crashes in multithreaded programs
Status in jackd2 package in Ubuntu:
New
Status in jackd2 package in Debian:
New
Bug description:
After upgrading to Ubuntu 19.04, I started experiencing sporadic
crashes in kodi when turning my AV receiver on. Ubuntu 19.04 upgraded
alsa-plugins to 1.1.8. For alsa-plugins >= 1.1.8, the ALSA jack plugin
is enabled by default in /etc/alsa/conf.d/50-jack.conf.
The crashes are caused by a race condition when kodi's audio engine
thread is enumerating the ALSA sound devices, and the udev thread is
enumerating the udev devices triggered by the sound device add from
turning the AVR on.
When enumering the ALSA jack plugin device, it tries to connect to
connect to jackd. Since I don't have jackd installed, it fails to
connect. libjack closes the socket on error, and then closes it again
in it's cleanup code. Since it's closing the same file descriptor
twice, it interacts with other threads that have potentially opened
file descriptors, and causes the crash.
This same bug could potentially affect other multithreaded programs
that enumerate ALSA devices.
Fix committed upstream:
https://github.com/jackaudio/jack2/commit/dad4b5702782eef3bd66e3c3f4fefaaae3571208
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/jackd2/+bug/1833479/+subscriptions
Follow ups
-
[Bug 1833479] Re: libjack-jackd2-0 double close on a failure to connect to jackd which causes crashes in multithreaded programs
From: Bug Watch Updater, 2020-07-21
-
[Bug 1833479] Re: libjack-jackd2-0 double close on a failure to connect to jackd which causes crashes in multithreaded programs
From: Sebastien Bacher, 2020-04-16
-
[Bug 1833479] Re: libjack-jackd2-0 double close on a failure to connect to jackd which causes crashes in multithreaded programs
From: Launchpad Bug Tracker, 2020-04-16
-
[Bug 1833479] Re: libjack-jackd2-0 double close on a failure to connect to jackd which causes crashes in multithreaded programs
From: Sebastien Bacher, 2020-04-16
-
[Bug 1833479] Re: libjack-jackd2-0 double close on a failure to connect to jackd which causes crashes in multithreaded programs
From: Joseph Yasi, 2020-04-12
-
[Bug 1833479] Re: libjack-jackd2-0 double close on a failure to connect to jackd which causes crashes in multithreaded programs
From: Joseph Yasi, 2020-04-12
-
[Bug 1833479] Re: libjack-jackd2-0 double close on a failure to connect to jackd which causes crashes in multithreaded programs
From: Joseph Yasi, 2020-01-27
-
[Bug 1833479] Re: libjack-jackd2-0 double close on a failure to connect to jackd which causes crashes in multithreaded programs
From: Teeedubb, 2019-11-21
-
[Bug 1833479] Re: libjack-jackd2-0 double close on a failure to connect to jackd which causes crashes in multithreaded programs
From: Joseph Yasi, 2019-10-22
-
[Bug 1833479] Re: libjack-jackd2-0 double close on a failure to connect to jackd which causes crashes in multithreaded programs
From: Bug Watch Updater, 2019-09-02
-
[Bug 1833479] Re: libjack-jackd2-0 double close on a failure to connect to jackd which causes crashes in multithreaded programs
From: Mathew Hodson, 2019-08-08
-
[Bug 1833479] Re: libjack-jackd2-0 double close on a failure to connect to jackd which causes crashes in multithreaded programs
From: Eduardo dos Santos Barretto, 2019-08-05
-
[Bug 1833479] Re: libjack-jackd2-0 double close on a failure to connect to jackd which causes crashes in multithreaded programs
From: Joseph Yasi, 2019-07-05
-
[Bug 1833479] Re: libjack-jackd2-0 double close on a failure to connect to jackd which causes crashes in multithreaded programs
From: Alex Murray, 2019-07-05
-
[Bug 1833479] Re: libjack-jackd2-0 double close on a failure to connect to jackd which causes crashes in multithreaded programs
From: Simon Quigley, 2019-07-02
-
[Bug 1833479] Re: libjack-jackd2-0 double close on a failure to connect to jackd which causes crashes in multithreaded programs
From: Mathew Hodson, 2019-06-23
-
[Bug 1833479] Re: libjack-jackd2-0 double close on a failure to connect to jackd which causes crashes in multithreaded programs
From: Joseph Yasi, 2019-06-20
-
[Bug 1833479] Re: libjack-jackd2-0 double close on a failure to connect to jackd which causes crashes in multithreaded programs
From: Ubuntu Foundations Team Bug Bot, 2019-06-20
-
[Bug 1833479] Re: libjack-jackd2-0 double close on a failure to connect to jackd which causes crashes in multithreaded programs
From: Joseph Yasi, 2019-06-20
-
[Bug 1833479] Re: libjack-jackd2-0 double close on a failure to connect to jackd which causes crashes in multithreaded programs
From: Joseph Yasi, 2019-06-20
-
[Bug 1833479] Re: libjack-jackd2-0 double close on a failure to connect to jackd which causes crashes in multithreaded programs
From: Joseph Yasi, 2019-06-20