Dan Carpenter
fb7bcd1722
fs/ntfs3: Fix an NULL dereference bug
...
[ Upstream commit b2dd7b953c25ffd5912dda17e980e7168bebcf6c ]
The issue here is when this is called from ntfs_load_attr_list(). The
"size" comes from le32_to_cpu(attr->res.data_size) so it can't overflow
on a 64bit systems but on 32bit systems the "+ 1023" can overflow and
the result is zero. This means that the kmalloc will succeed by
returning the ZERO_SIZE_PTR and then the memcpy() will crash with an
Oops on the next line.
Fixes: be71b5cba2e6 ("fs/ntfs3: Add attrib operations")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-02-16 19:10:52 +01:00
..
2024-02-05 20:14:32 +00:00
2023-08-29 20:21:42 -07:00
2023-08-29 20:21:42 -07:00
2024-02-05 20:14:16 +00:00
2023-08-28 11:39:14 -07:00
2023-08-29 20:21:42 -07:00
2023-08-29 20:21:42 -07:00
2024-01-31 16:19:10 -08:00
2023-08-29 14:25:26 -07:00
2024-02-05 20:14:33 +00:00
2023-08-28 09:31:32 -07:00
2023-07-13 10:28:05 +02:00
2023-08-28 11:04:18 -07:00
2023-05-23 19:46:09 -07:00
2024-01-20 11:51:37 +01:00
2023-08-28 10:17:14 -07:00
2024-01-31 16:18:54 -08:00
2024-02-05 20:14:17 +00:00
2024-01-25 15:35:15 -08:00
2023-08-29 20:21:42 -07:00
2024-02-05 20:14:16 +00:00
2023-11-28 17:19:44 +00:00
2023-08-29 17:45:22 -04:00
2023-12-08 08:52:19 +01:00
2024-02-16 19:10:41 +01:00
2024-02-05 20:14:28 +00:00
2023-08-29 20:21:42 -07:00
2023-08-29 20:21:42 -07:00
2024-01-31 16:19:01 -08:00
2023-12-20 17:01:52 +01:00
2024-01-25 15:35:17 -08:00
2023-08-29 20:21:42 -07:00
2023-08-29 20:21:42 -07:00
2023-07-24 10:30:00 +02:00
2023-08-29 20:21:42 -07:00
2023-11-28 17:20:05 +00:00
2023-10-19 09:41:36 -07:00
2023-08-29 20:21:42 -07:00
2024-01-20 11:51:43 +01:00
2023-07-24 10:30:01 +02:00
2024-02-05 20:14:16 +00:00
2024-02-05 20:14:32 +00:00
2023-08-29 17:45:22 -04:00
2023-08-29 20:21:42 -07:00
2023-09-18 12:03:46 -07:00
2024-01-25 15:35:18 -08:00
2024-01-31 16:19:06 -08:00
2023-12-13 18:45:22 +01:00
2023-08-31 12:07:34 -05:00
2023-10-19 16:19:20 +02:00
2023-08-29 20:21:42 -07:00
2024-02-16 19:10:52 +01:00
2023-08-31 15:18:15 -07:00
2023-08-29 20:21:42 -07:00
2023-07-24 10:30:03 +02:00
2023-08-11 09:04:57 +02:00
2023-12-03 07:33:03 +01:00
2024-02-05 20:14:17 +00:00
2024-02-05 20:14:16 +00:00
2023-08-29 20:21:42 -07:00
2023-08-29 20:21:42 -07:00
2023-11-28 17:20:04 +00:00
2023-07-24 10:30:04 +02:00
2024-02-05 20:14:26 +00:00
2023-08-29 20:21:42 -07:00
2024-02-16 19:10:43 +01:00
2023-07-24 10:30:05 +02:00
2023-06-15 13:37:53 +02:00
2023-08-29 20:21:42 -07:00
2023-12-20 17:02:00 +01:00
2024-01-31 16:18:56 -08:00
2023-08-30 12:10:50 -07:00
2023-08-29 20:21:42 -07:00
2023-08-28 09:31:32 -07:00
2023-08-20 10:33:43 -07:00
2024-02-16 19:10:46 +01:00
2023-08-28 11:59:52 -07:00
2023-09-20 14:22:01 +02:00
2023-08-28 10:17:14 -07:00
2023-08-11 09:04:57 +02:00
2023-09-29 17:20:45 -07:00
2023-06-28 20:35:21 -07:00
2023-07-13 10:28:04 +02:00
2023-09-25 08:55:00 -07:00
2023-06-26 09:50:21 -07:00
2024-01-10 17:16:53 +01:00
2024-02-05 20:14:26 +00:00
2023-06-28 10:28:11 -07:00
2023-08-18 10:12:11 -07:00
2023-07-11 11:41:34 +02:00
2023-07-26 14:56:07 +02:00
2024-01-31 16:19:06 -08:00
2023-07-10 14:36:11 +02:00
2023-06-12 10:43:45 +02:00
2023-08-08 19:36:51 +02:00
2023-08-28 10:17:14 -07:00
2023-10-12 18:53:36 +03:00
2023-08-21 13:46:25 -07:00
2023-11-20 11:58:52 +01:00
2023-08-14 18:48:02 +02:00
2023-12-03 07:33:03 +01:00
2023-08-29 20:21:42 -07:00
2024-01-31 16:18:54 -08:00
2023-08-29 20:21:42 -07:00
2023-08-23 14:17:43 -07:00
2023-08-19 12:12:12 +02:00
2024-01-05 15:19:40 +01:00
2023-08-31 15:32:18 -07:00
2023-08-02 09:13:09 -06:00
2024-01-31 16:18:57 -08:00
2024-01-25 15:35:17 -08:00
2023-07-13 10:28:04 +02:00
2023-12-20 17:01:51 +01:00
2024-01-31 16:19:09 -08:00
2023-05-19 04:30:22 +02:00
2023-05-19 04:30:22 +02:00
2023-07-13 10:28:04 +02:00
2023-05-24 08:42:16 -06:00
2023-08-15 08:32:45 +02:00
2023-08-06 15:08:35 +02:00
2023-05-24 11:03:59 +02:00
2023-08-29 14:25:26 -07:00
2023-07-13 10:28:04 +02:00
2023-12-03 07:33:03 +01:00
2023-08-31 12:47:15 +02:00
2023-05-23 21:43:26 -07:00
2023-08-24 16:20:27 -07:00
2023-08-22 10:57:46 +02:00