Jann Horn
642335f3ea
ext4: don't treat fhandle lookup of ea_inode as FS corruption
...
A file handle that userspace provides to open_by_handle_at() can
legitimately contain an outdated inode number that has since been reused
for another purpose - that's why the file handle also contains a generation
number.
But if the inode number has been reused for an ea_inode, check_igot_inode()
will notice, __ext4_iget() will go through ext4_error_inode(), and if the
inode was newly created, it will also be marked as bad by iget_failed().
This all happens before the point where the inode generation is checked.
ext4_error_inode() is supposed to only be used on filesystem corruption; it
should not be used when userspace just got unlucky with a stale file
handle. So when this happens, let __ext4_iget() just return an error.
Fixes: b3e6bcb945 ("ext4: add EA_INODE checking to ext4_iget()")
Signed-off-by: Jann Horn <jannh@google.com >
Reviewed-by: Jan Kara <jack@suse.cz >
Link: https://patch.msgid.link/20241129-ext4-ignore-ea-fhandle-v1-1-e532c0d1cee0@google.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu >
2025-04-10 10:53:50 -04:00
..
2025-01-30 09:13:35 -08:00
2024-10-08 14:41:53 +02:00
2024-10-08 14:41:53 +02:00
2025-01-30 09:13:35 -08:00
2024-10-28 13:16:56 +01:00
2025-02-06 22:35:11 -05:00
2024-09-18 11:44:43 +02:00
2024-08-07 11:33:21 +02:00
2025-02-05 08:13:07 -08:00
2025-01-28 13:48:37 +01:00
2025-01-31 10:30:34 -08:00
2025-01-30 09:13:35 -08:00
2024-11-14 07:45:20 +01:00
2024-07-15 11:14:59 -07:00
2025-01-27 19:25:23 -05:00
2025-01-30 08:22:31 +01:00
2025-01-28 13:48:37 +01:00
2024-12-19 13:11:24 -06:00
2025-01-27 19:25:23 -05:00
2025-01-22 13:28:17 +01:00
2024-10-15 15:58:36 +02:00
2025-02-07 10:27:25 +01:00
2025-01-30 09:13:35 -08:00
2024-11-15 11:34:57 +01:00
2024-09-16 09:14:02 +02:00
2025-04-10 10:53:50 -04:00
2025-01-27 20:58:58 -08:00
2025-01-27 19:25:24 -05:00
2024-11-06 10:42:06 +01:00
2025-01-30 09:13:35 -08:00
2025-02-07 10:27:25 +01:00
2025-01-30 09:13:35 -08:00
2024-11-18 09:35:30 -08:00
2025-01-31 09:33:54 -08:00
2024-10-08 14:41:53 +02:00
2025-01-25 20:22:30 -08:00
2025-01-26 18:36:23 -08:00
2024-12-05 13:52:37 +01:00
2025-03-21 00:59:28 -04:00
2024-12-05 12:31:40 +01:00
2025-01-27 19:25:23 -05:00
2025-02-01 15:07:56 -08:00
2025-01-28 13:48:37 +01:00
2024-08-07 11:33:36 +02:00
2025-01-20 09:29:11 -08:00
2025-01-30 09:13:35 -08:00
2025-01-21 11:34:43 -05:00
2025-01-28 14:23:46 -08:00
2025-02-01 03:53:26 -08:00
2024-10-02 17:23:23 -04:00
2025-02-07 10:27:26 +01:00
2024-12-30 11:37:40 +03:00
2025-02-01 03:53:24 -08:00
2024-08-07 11:33:21 +02:00
2024-06-20 09:46:01 +02:00
2025-01-31 09:40:31 -08:00
2025-02-01 15:07:56 -08:00
2025-01-30 09:13:35 -08:00
2025-01-20 13:37:14 -08:00
2024-12-03 10:40:36 +01:00
2025-01-28 13:48:37 +01:00
2024-08-21 22:32:58 +02:00
2025-02-06 10:01:22 -06:00
2025-01-24 22:47:22 -08:00
2025-01-09 10:43:58 +01:00
2024-08-07 11:33:36 +02:00
2024-07-22 18:25:47 -07:00
2025-01-27 19:25:23 -05:00
2025-01-18 15:31:35 +01:00
2024-11-26 22:54:24 +01:00
2024-11-12 19:02:12 -05:00
2024-12-11 14:11:23 -08:00
2025-02-07 10:27:24 +01:00
2025-01-28 13:48:37 +01:00
2025-02-03 08:51:24 -08:00
2024-10-02 12:02:15 -07:00
2025-01-28 13:48:37 +01:00
2025-01-27 19:25:45 -05:00
2024-10-10 10:20:51 +02:00
2024-12-02 11:25:09 +01:00
2024-12-11 17:45:18 +01:00
2024-12-11 17:45:18 +01:00
2025-01-10 08:49:05 -08:00
2025-01-20 13:27:58 -08:00
2024-08-07 11:26:54 -07:00
2024-11-23 09:58:07 -08:00
2024-10-22 11:16:57 +02:00
2024-10-17 18:38:49 +01:00
2025-01-28 13:48:37 +01:00
2024-10-07 13:51:47 +02:00
2025-02-07 09:22:31 -08:00
2024-08-19 13:45:02 +02:00
2024-07-24 20:59:29 +02:00
2024-11-03 01:28:06 -05:00
2025-01-28 13:48:37 +01:00
2025-01-28 13:48:37 +01:00
2024-12-09 11:34:29 +01:00
2024-12-17 09:16:11 +01:00
2025-02-07 10:27:27 +01:00
2025-01-20 09:40:49 -08:00
2024-12-22 11:29:52 +01:00
2024-12-21 01:36:17 -05:00
2024-11-13 14:08:34 +01:00
2024-11-03 01:28:06 -05:00
2025-01-28 13:48:37 +01:00
2024-11-18 14:54:10 -08:00
2024-11-03 01:28:06 -05:00
2024-10-21 16:29:38 +02:00
2024-06-19 13:13:55 -07:00
2024-11-03 01:28:06 -05:00
2025-01-30 09:13:35 -08:00
2025-01-28 13:48:37 +01:00
2024-10-21 16:29:38 +02:00
2024-09-24 15:29:42 -07:00
2025-01-09 16:58:54 +01:00
2024-10-28 13:26:54 +01:00
2025-01-30 09:13:35 -08:00
2025-02-07 10:27:26 +01:00
2025-01-09 16:58:52 +01:00
2025-02-07 10:27:26 +01:00
2025-02-07 10:27:28 +01:00
2025-02-07 10:27:26 +01:00
2024-12-22 11:29:52 +01:00
2024-10-22 11:16:59 +02:00
2024-06-28 14:36:43 +02:00
2024-11-18 12:24:06 -08:00
2024-11-03 01:28:06 -05:00
2024-11-03 01:28:07 -05:00
2025-01-13 16:24:16 +01:00
2024-10-22 11:16:57 +02:00
2024-11-03 01:28:06 -05:00
2025-01-25 20:22:31 -08:00
2025-02-07 10:27:24 +01:00
2024-11-03 01:28:06 -05:00
2025-01-25 20:22:23 -08:00
2024-11-03 01:28:06 -05:00
2025-01-28 13:48:37 +01:00
2024-11-19 16:35:06 -08:00
2025-01-28 13:48:37 +01:00
2024-11-03 01:28:06 -05:00
2024-11-06 13:00:01 -05:00