Commit a6e9455
ext4: avoid potential buffer over-read in parse_apply_sb_mount_options()
commit 8ecb790ea8c3fc69e77bace57f14cf0d7c177bd8 upstream.
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: [email protected]
Fixes: 8b67f04 ("ext4: Add mount options in superblock")
Reviewed-by: Jan Kara <[email protected]>
Reviewed-by: Darrick J. Wong <[email protected]>
Signed-off-by: Theodore Ts'o <[email protected]>
Message-ID: <[email protected]>
Signed-off-by: Theodore Ts'o <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent 3ae197d commit a6e9455
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