Eric Biggers
49d7e80073
f2fs: avoid utf8_strncasecmp() with unstable name
...
If the dentry name passed to ->d_compare() fits in dentry::d_iname, then
it may be concurrently modified by a rename. This can cause undefined
behavior (possibly out-of-bounds memory accesses or crashes) in
utf8_strncasecmp(), since fs/unicode/ isn't written to handle strings
that may be concurrently modified.
Fix this by first copying the filename to a stack buffer if needed.
This way we get a stable snapshot of the filename.
Fixes: 2c2eb7a300cd ("f2fs: Support case-insensitive file name lookups")
Cc: <stable@vger.kernel.org> # v5.4+
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Daniel Rosenberg <drosen@google.com>
Cc: Gabriel Krisman Bertazi <krisman@collabora.co.uk>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2020-06-08 20:41:28 -07:00
..
2017-11-30 08:40:49 +00:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-12-14 09:53:15 +01:00
2017-12-05 11:26:29 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-06-28 15:49:24 -07:00
2017-11-02 11:10:55 +01:00
2018-06-28 15:49:24 -07:00
2017-11-02 10:04:46 -07:00
2017-11-24 08:37:05 +01:00
2017-11-02 11:10:55 +01:00
2020-04-08 15:29:07 -07:00
2017-07-15 12:00:42 -07:00
2017-08-24 13:23:03 -07:00
2017-11-02 11:10:55 +01:00
2017-11-30 08:40:45 +00:00
2017-11-02 11:10:55 +01:00
2017-09-07 11:59:42 -07:00
2017-11-02 11:10:55 +01:00
2020-04-08 15:29:07 -07:00
2020-06-08 20:41:28 -07:00
2017-12-05 11:26:29 +01:00
2017-11-02 11:10:55 +01:00
2018-01-09 17:01:36 -08:00
2018-06-28 15:49:24 -07:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-03 07:39:19 -07:00
2017-11-30 08:40:45 +00:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-09-07 11:59:42 -07:00
2017-12-05 11:26:30 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-01-09 17:01:36 -08:00
2017-12-05 11:26:30 +01:00
2018-06-28 15:49:24 -07:00
2017-11-02 11:10:55 +01:00
2017-11-30 08:40:47 +00:00
2017-11-02 11:10:55 +01:00
2017-11-24 08:37:04 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-30 08:40:43 +00:00
2018-01-09 17:01:36 -08:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-09-06 17:27:26 -07:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2020-04-08 15:29:09 -07:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2019-09-23 19:08:46 -07:00
2020-02-13 15:17:48 -08:00
2018-01-09 17:01:36 -08:00
2018-01-09 17:01:36 -08:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-09-04 19:05:15 -04:00
2017-09-14 18:13:32 -07:00
2017-09-14 18:13:32 -07:00
2017-11-02 11:10:55 +01:00
2017-10-13 16:18:33 -07:00
2017-10-03 17:54:25 -07:00
2019-12-02 15:55:55 -08:00
2018-01-09 17:01:36 -08:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-30 08:40:53 +00:00
2019-07-30 10:02:56 -07:00
2018-01-09 17:01:36 -08:00
2017-11-02 11:10:55 +01:00
2017-09-08 18:26:49 -07:00
2018-01-09 17:01:36 -08:00
2018-01-09 17:01:36 -08:00
2017-11-02 11:10:55 +01:00
2017-08-28 00:50:23 -04:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-01-09 17:01:36 -08:00
2020-05-30 08:46:11 -07:00
2020-02-13 15:12:08 -08:00
2017-09-13 09:11:44 -07:00
2017-11-02 11:10:55 +01:00
2017-10-16 12:11:56 -07:00
2019-09-23 19:09:33 -07:00
2019-12-04 13:27:31 -08:00
2019-09-23 19:09:33 -07:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2019-07-30 10:04:40 -07:00
2018-01-09 17:01:36 -08:00
2017-11-02 11:10:55 +01:00
2017-09-05 12:53:12 +02:00
2017-12-14 09:53:08 +01:00
2018-01-27 13:29:12 -08:00
2018-01-09 17:01:36 -08:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-01-09 17:01:36 -08:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2019-09-23 19:06:59 -07:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-01-09 17:01:36 -08:00
2017-11-02 11:10:55 +01:00
2017-10-04 18:03:15 +11:00