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
| ||
|
Message-ID: <202309251104.2039A045E@keescook> Date: Mon, 25 Sep 2023 11:04:32 -0700 From: Kees Cook <keescook@...omium.org> To: Justin Stitt <justinstitt@...gle.com> Cc: Alasdair Kergon <agk@...hat.com>, Mike Snitzer <snitzer@...nel.org>, dm-devel@...hat.com, linux-kernel@...r.kernel.org, linux-hardening@...r.kernel.org Subject: Re: [PATCH] dm crypt: replace open-coded kmemdup_nul On Mon, Sep 25, 2023 at 06:35:54AM +0000, Justin Stitt wrote: > kzalloc() followed by strncpy() on an expected NUL-terminated string is > just kmemdup_nul(). Let's simplify this code (while also dropping a > deprecated strncpy() call [1]). > > Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1] > Link: https://github.com/KSPP/linux/issues/90 > Cc: linux-hardening@...r.kernel.org > Cc: Kees Cook <keescook@...omium.org> > Signed-off-by: Justin Stitt <justinstitt@...gle.com> This looks correct to me. Thanks! Reviewed-by: Kees Cook <keescook@...omium.org> -- Kees Cook
Powered by blists - more mailing lists