[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202212280925459299284@zte.com.cn>
Date: Wed, 28 Dec 2022 09:25:45 +0800 (CST)
From: <yang.yang29@....com.cn>
To: <James.Bottomley@...senPartnership.com>
Cc: <deller@....de>, <linux-parisc@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <xu.panda@....com.cn>
Subject: Re: [PATCH linux-next] parisc: use strscpy() to instead of strncpy()
> the array buf[] is actually buf[count], so if count < 64 then
> sizeof(buf) < sizeof(in) and you're copying whatever is after buf on
> the stack or wherever it comes from. The amount you copy into in[]
> truly has to be the smaller of count and sizeof(in). These are file
> operations, so you shouldn't rely on buf[] being null terminated
> (kernfs ensures it is, but it's a dangerous thing to rely on in the
> face of someone trying to exploit a stack smashing attack).
Should we send patchv3 which is back to v1, or we directly use
patchv1 to continue the reviewing?
Thanks!
Powered by blists - more mailing lists