Commit 8ecb790
committed
ext4: avoid potential buffer over-read in parse_apply_sb_mount_options()
Unlike other strings in the ext4 superblock, we rely on tune2fs to
make sure s_mount_opts is NUL terminated. Harden
parse_apply_sb_mount_options() by treating s_mount_opts as a potential
__nonstring.
Cc: stable@vger.kernel.org
Fixes: 8b67f04 ("ext4: Add mount options in superblock")
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Message-ID: <20250916-tune2fs-v2-1-d594dc7486f0@mit.edu>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>1 parent 12e803c commit 8ecb790
1 file changed
Lines changed: 5 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2469 | 2469 | | |
2470 | 2470 | | |
2471 | 2471 | | |
2472 | | - | |
| 2472 | + | |
2473 | 2473 | | |
2474 | 2474 | | |
2475 | 2475 | | |
2476 | 2476 | | |
2477 | 2477 | | |
2478 | 2478 | | |
2479 | 2479 | | |
2480 | | - | |
2481 | | - | |
2482 | | - | |
2483 | | - | |
2484 | | - | |
| 2480 | + | |
2485 | 2481 | | |
2486 | 2482 | | |
2487 | 2483 | | |
2488 | | - | |
| 2484 | + | |
2489 | 2485 | | |
2490 | 2486 | | |
2491 | 2487 | | |
| |||
2517 | 2513 | | |
2518 | 2514 | | |
2519 | 2515 | | |
2520 | | - | |
2521 | | - | |
2522 | | - | |
2523 | | - | |
2524 | | - | |
| 2516 | + | |
| 2517 | + | |
2525 | 2518 | | |
2526 | 2519 | | |
2527 | 2520 | | |
| |||
0 commit comments