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] [thread-next>] [day] [month] [year] [list]
Message-ID: <528e184b-9cb1-40a7-b757-db11a852dd59@samsung.com>
Date: Thu, 11 Apr 2024 13:40:47 +0200
From: Marek Szyprowski <m.szyprowski@...sung.com>
To: Jens Axboe <axboe@...nel.dk>, linux-fsdevel@...r.kernel.org
Cc: brauner@...nel.org, linux-kernel@...r.kernel.org,
	viro@...iv.linux.org.uk
Subject: Re: [PATCH 2/4] timerfd: convert to ->read_iter()

Hi,

On 11.04.2024 00:27, Jens Axboe wrote:
> On 4/9/24 9:22 AM, Jens Axboe wrote:
>> @@ -312,8 +313,8 @@ static ssize_t timerfd_read(struct file *file, char __user *buf, size_t count,
>>   		ctx->ticks = 0;
>>   	}
>>   	spin_unlock_irq(&ctx->wqh.lock);
>> -	if (ticks)
>> -		res = put_user(ticks, (u64 __user *) buf) ? -EFAULT: sizeof(ticks);
>> +	if (ticks && !copy_to_iter_full(&ticks, sizeof(ticks), to))
>> +		res = -EFAULT;
>>   	return res;
>>   }
> Dumb thinko here, as that should be:
>
> if (ticks) {
> 	res = copy_to_iter(&ticks, sizeof(ticks), to);
> 	if (!res)
> 		res = -EFAULT;
> }
>
> I've updated my branch, just a heads-up. Odd how it passing testing,
> guess I got stack lucky...

The old version got its way into today's linux-next and bisecting the 
boot issues directed me here. There is nothing more to report, but I can 
confirm that the above change indeed fixes the problems observed on 
next-20240411.

Tested-by: Marek Szyprowski <m.szyprowski@...sung.com>

I hope that tomorrow's linux-next will have the correct version of this 
patch.

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ