[alsa-devel] [PATCH] control_hw: Fix issue when applying seccomp policy

Takashi Iwai tiwai at suse.de
Wed Aug 15 11:37:11 CEST 2018


On Wed, 15 Aug 2018 10:17:50 +0200,
Hsin-Yu Chao wrote:
> 
> When seccomp policy is applied to filter ioctl syscall with
> SNDRV_CTL_IOCTL_TLV_COMMAND, SNDRV_CTL_IOCTL_TLV_READ and
> SNDRV_CTL_IOCTL_TLV_WRITE in whiltelist, alsa-lib still breaks
> in at snd_ctl_hw_elem_tlv().
> Fix the problem by passing unsigned int to ioctl.

Could you explain exactly what breaks and how?


thanks,

Takashi

> 
> Signed-off-by: Hsin-Yu Chao <hychao at chromium.org>
> ---
>  src/control/control_hw.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/control/control_hw.c b/src/control/control_hw.c
> index 68eca522..b54d65f2 100644
> --- a/src/control/control_hw.c
> +++ b/src/control/control_hw.c
> @@ -215,7 +215,7 @@ static int snd_ctl_hw_elem_tlv(snd_ctl_t *handle, int op_flag,
>  			       unsigned int numid,
>  			       unsigned int *tlv, unsigned int tlv_size)
>  {
> -	int inum;
> +	unsigned int inum;
>  	snd_ctl_hw_t *hw = handle->private_data;
>  	struct snd_ctl_tlv *xtlv;
>  	
> -- 
> 2.18.0.865.gffc8e1a3cd6-goog
> 
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel at alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> 


More information about the Alsa-devel mailing list