Hello community,

here is the log from the commit of package alsa-utils for openSUSE:Factory 
checked in at 2015-07-16 17:16:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/alsa-utils (Old)
 and      /work/SRC/openSUSE:Factory/.alsa-utils.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "alsa-utils"

Changes:
--------
--- /work/SRC/openSUSE:Factory/alsa-utils/alsa-utils.changes    2015-04-30 
11:49:40.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.alsa-utils.new/alsa-utils.changes       
2015-07-16 17:16:53.000000000 +0200
@@ -1,0 +2,9 @@
+Mon Jul 13 16:41:51 CEST 2015 - [email protected]
+
+- Backport upstream fixes for aplay signal handling and alsactl
+  possible buffer overflow of readlink():
+  0004-aplay-Fix-type-for-signal-flag.patch
+  0005-aplay-Fix-uninterruptible-aplay.patch
+  0006-alsactl-terminate-readlink-result-string.patch
+
+-------------------------------------------------------------------

New:
----
  0004-aplay-Fix-type-for-signal-flag.patch
  0005-aplay-Fix-uninterruptible-aplay.patch
  0006-alsactl-terminate-readlink-result-string.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ alsa-utils.spec ++++++
--- /var/tmp/diff_new_pack.z1wyXk/_old  2015-07-16 17:16:54.000000000 +0200
+++ /var/tmp/diff_new_pack.z1wyXk/_new  2015-07-16 17:16:54.000000000 +0200
@@ -48,6 +48,9 @@
 Patch1:         0001-amixer-Don-t-set-only-the-first-item-in-sset_enum.patch
 Patch2:         0002-amixer-expand-local-storage-for-item-name-according-.patch
 Patch3:         0003-alsa-info-Don-t-try-update-when-wget-isn-t-available.patch
+Patch4:         0004-aplay-Fix-type-for-signal-flag.patch
+Patch5:         0005-aplay-Fix-uninterruptible-aplay.patch
+Patch6:         0006-alsactl-terminate-readlink-result-string.patch
 #
 Patch99:        alsa-utils-gettext-version-removal.diff
 BuildRequires:  alsa-devel
@@ -78,6 +81,9 @@
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
 #
 %if 0%{?suse_version} < 1020
 %patch99 -p1

++++++ 0004-aplay-Fix-type-for-signal-flag.patch ++++++
>From 9aa5c271f4eb2e3481b4a5076eb025242215ad7f Mon Sep 17 00:00:00 2001
From: Takashi Iwai <[email protected]>
Date: Wed, 29 Apr 2015 18:01:07 +0200
Subject: [PATCH] aplay: Fix type for signal flag

A flag used in signal handlers has to be a special atomic type,
volatile sig_atomic_t.

Signed-off-by: Takashi Iwai <[email protected]>
---
 aplay/aplay.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/aplay/aplay.c b/aplay/aplay.c
index e58e1bcbdd7e..dfa1a0a95867 100644
--- a/aplay/aplay.c
+++ b/aplay/aplay.c
@@ -107,7 +107,7 @@ static snd_pcm_stream_t stream = SND_PCM_STREAM_PLAYBACK;
 static int mmap_flag = 0;
 static int interleaved = 1;
 static int nonblock = 0;
-static int in_aborting = 0;
+static volatile sig_atomic_t in_aborting = 0;
 static u_char *audiobuf = NULL;
 static snd_pcm_uframes_t chunk_size = 0;
 static unsigned period_time = 0;
-- 
2.4.5

++++++ 0005-aplay-Fix-uninterruptible-aplay.patch ++++++
>From 46b60827568ca4aad15eeacbc9dcf8597986ca8e Mon Sep 17 00:00:00 2001
From: Takashi Iwai <[email protected]>
Date: Wed, 29 Apr 2015 18:01:58 +0200
Subject: [PATCH] aplay: Fix uninterruptible aplay

When aplay is invoked to play from stdin, it can't be terminated by
normal signals like SIGTERM or SIGINT.  It's because our signal
handler tries to trap as much as possible while the stalling point is
not in the PCM loop but rather the file I/O.

For fixing this, leave our signal handler once when a signal is
received and snd_pcm_abort() is called.  At the next hit, it shall be
handled normally.

Signed-off-by: Takashi Iwai <[email protected]>
---
 aplay/aplay.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/aplay/aplay.c b/aplay/aplay.c
index dfa1a0a95867..459f7dd6f667 100644
--- a/aplay/aplay.c
+++ b/aplay/aplay.c
@@ -399,7 +399,7 @@ static void signal_handler(int sig)
                handle = NULL;
                prg_exit(EXIT_FAILURE);
        }
-       signal(sig, signal_handler);
+       signal(sig, SIG_DFL);
 }
 
 /* call on SIGUSR1 signal. */
-- 
2.4.5

++++++ 0006-alsactl-terminate-readlink-result-string.patch ++++++
>From 13c826941445a66ece203a09e6739c979ac5900c Mon Sep 17 00:00:00 2001
From: Tobias Stoeckmann <[email protected]>
Date: Sat, 11 Jul 2015 13:23:57 +0200
Subject: [PATCH] alsactl: terminate readlink result string

readlink does not guarantee that its result string is nul-terminated.
Instead, increase the buffer by one byte to make sure that we can
add '\0' at the end.

Signed-off-by: Takashi Iwai <[email protected]>
---
 alsactl/init_sysfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/alsactl/init_sysfs.c b/alsactl/init_sysfs.c
index 0cbada2e169b..5c789b61b0e5 100644
--- a/alsactl/init_sysfs.c
+++ b/alsactl/init_sysfs.c
@@ -108,11 +108,11 @@ static char *sysfs_attr_get_value(const char *devpath, 
const char *attr_name)
 
        if (S_ISLNK(statbuf.st_mode)) {
                /* links return the last element of the target path */
-               char link_target[PATH_SIZE];
+               char link_target[PATH_SIZE + 1];
                int len;
                const char *pos;
 
-               len = readlink(path_full, link_target, sizeof(link_target));
+               len = readlink(path_full, link_target, sizeof(link_target) - 1);
                if (len > 0) {
                        link_target[len] = '\0';
                        pos = strrchr(link_target, '/');
-- 
2.4.5


Reply via email to