lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <53626DFC.6050200@gmx.de>
Date:	Thu, 01 May 2014 17:53:32 +0200
From:	Heinrich Schuchardt <xypron.glpk@....de>
To:	Andrew Morton <akpm@...ux-foundation.org>
CC:	Jan Kara <jack@...e.cz>, Eric Paris <eparis@...hat.com>,
	linux-kernel@...r.kernel.org,
	Michael Kerrisk <mtk.manpages@...il.com>
Subject: Fwd: Re: [PATCH 1/1] fanotify: for FAN_MARK_FLUSH check flags

Hello Andrew,

the patch below was
Acked-by: Michael Kerrisk <mtk.manpages@...il.com>
https://lkml.org/lkml/2014/4/24/23
Acked-by: Jan Kara <jack@...e.cz>
https://lkml.org/lkml/2014/4/24/1048

Please, consider it for inclusion in the mm tree.

Best regards

Heinrich Schuchardt


On 24.04.2014 12:03, Jan Kara wrote:
> On Wed 23-04-14 23:55:51, Heinrich Schuchardt wrote:
>> If fanotify_mark is called with illegal value of arguments flags and marks
>> it usually returns EINVAL.
>>
>> When fanotify_mark is called with FAN_MARK_FLUSH the argument flags is not
>> checked for irrelevant flags like FAN_MARK_IGNORED_MASK.
>>
>> The patch removes this inconsistency.
>>
>> If an irrelevant flag is set error EINVAL is returned.
>    OK, as Michael I think this shouldn't cause real userspace breakage and
> it's better to have the flags checked. So feel free to add:
> Acked-by: Jan Kara <jack@...e.cz>
>
> 							Honza
>
>>
>> Signed-off-by: Heinrich Schuchardt <xypron.glpk@....de>
>> ---
>>   fs/notify/fanotify/fanotify_user.c | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c
>> index 287a22c..8bba549 100644
>> --- a/fs/notify/fanotify/fanotify_user.c
>> +++ b/fs/notify/fanotify/fanotify_user.c
>> @@ -819,7 +819,10 @@ SYSCALL_DEFINE5(fanotify_mark, int, fanotify_fd, unsigned int, flags,
>>   	case FAN_MARK_REMOVE:
>>   		if (!mask)
>>   			return -EINVAL;
>> +		break;
>>   	case FAN_MARK_FLUSH:
>> +		if (flags & ~(FAN_MARK_MOUNT | FAN_MARK_FLUSH))
>> +			return -EINVAL;
>>   		break;
>>   	default:
>>   		return -EINVAL;
>> --
>> 1.9.2
>>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ