[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <535b4ef7-3cfb-4816-bd7e-c0fa8725c7f8@rbox.co>
Date: Fri, 15 Nov 2024 00:36:35 +0100
From: Michal Luczaj <mhal@...x.co>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Eric Dumazet <edumazet@...gle.com>, netdev@...r.kernel.org
Subject: Re: [PATCH net] net: Make copy_safe_from_sockptr() match
documentation
On 11/14/24 04:29, Jakub Kicinski wrote:
> On Mon, 11 Nov 2024 00:17:34 +0100 Michal Luczaj wrote:
>> copy_safe_from_sockptr()
>> return copy_from_sockptr()
>> return copy_from_sockptr_offset()
>> return copy_from_user()
>>
>> copy_from_user() does not return an error on fault. Instead, it returns a
>> number of bytes that were not copied. Have it handled.
>>
>> Fixes: 6309863b31dd ("net: add copy_safe_from_sockptr() helper")
>> Signed-off-by: Michal Luczaj <mhal@...x.co>
>> ---
>> Patch has a side effect: it un-breaks garbage input handling of
>> nfc_llcp_setsockopt() and mISDN's data_sock_setsockopt().
>
> I'll move this to the commit message, it's important.
>
> Are you planning to scan callers of copy_from_sockptr() ?
> I looked at 3 callers who save the return value, 2 of them are buggy :S
Sure, I took a look:
https://lore.kernel.org/netdev/20241115-sockptr-copy-fixes-v1-0-d183c87fcbd5@rbox.co/
Have I missed anything?
Thanks,
Michal
Powered by blists - more mailing lists