Commit 5dff41a
jfs: fix array-index-out-of-bounds read in add_missing_indices
stbl is s8 but it must contain offsets into slot which can go from 0 to
127.
Added a bound check for that error and return -EIO if the check fails.
Also make jfs_readdir return with error if add_missing_indices returns
with an error.
Reported-by: syzbot+b974bd41515f770c608b@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com./bug?extid=b974bd41515f770c608b
Signed-off-by: Aditya Dutt <duttaditya18@gmail.com>
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>1 parent a468540 commit 5dff41a
1 file changed
+15
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2613 | 2613 | | |
2614 | 2614 | | |
2615 | 2615 | | |
2616 | | - | |
| 2616 | + | |
2617 | 2617 | | |
2618 | 2618 | | |
2619 | 2619 | | |
| |||
2622 | 2622 | | |
2623 | 2623 | | |
2624 | 2624 | | |
2625 | | - | |
| 2625 | + | |
2626 | 2626 | | |
2627 | 2627 | | |
2628 | 2628 | | |
| |||
2647 | 2647 | | |
2648 | 2648 | | |
2649 | 2649 | | |
| 2650 | + | |
| 2651 | + | |
| 2652 | + | |
| 2653 | + | |
| 2654 | + | |
| 2655 | + | |
| 2656 | + | |
| 2657 | + | |
| 2658 | + | |
| 2659 | + | |
2650 | 2660 | | |
2651 | 2661 | | |
2652 | 2662 | | |
| |||
2664 | 2674 | | |
2665 | 2675 | | |
2666 | 2676 | | |
| 2677 | + | |
2667 | 2678 | | |
2668 | 2679 | | |
2669 | 2680 | | |
| |||
3017 | 3028 | | |
3018 | 3029 | | |
3019 | 3030 | | |
3020 | | - | |
| 3031 | + | |
| 3032 | + | |
3021 | 3033 | | |
3022 | 3034 | | |
3023 | 3035 | | |
| |||
0 commit comments