diff options
author | Lukas Czerner <lczerner@redhat.com> | 2018-08-14 16:37:53 +0200 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2018-10-02 21:47:10 -0400 |
commit | b0ec76d623f737a32abc5ab8bb7198bf1d9939a4 (patch) | |
tree | 63cfe2fdbe93ccd7d29984bc73c6d1e939266946 /debugfs/icheck.c | |
parent | feb235e0812d6c5f1fda9e8c790b5bcb78aba285 (diff) | |
download | android_external_e2fsprogs-b0ec76d623f737a32abc5ab8bb7198bf1d9939a4.tar.gz android_external_e2fsprogs-b0ec76d623f737a32abc5ab8bb7198bf1d9939a4.tar.bz2 android_external_e2fsprogs-b0ec76d623f737a32abc5ab8bb7198bf1d9939a4.zip |
libe2p: avoid segfault when s_nr_users is too high
Currently in e2fsprogs tools it's possible to access out of bounds
memory when reading list of ids sharing a journal log
(journal_superblock_t->s_users[]) in case where s_nr_users is too high.
This is because we never check whether the s_nr_users fits into the
restriction of JFS_USERS_MAX. Fix it by checking that nr_users is not
bigger than JFS_USERS_MAX and error out when possiblem.
Also add test for dumpe2fs. The rest would require involving external
journal which is not possible to test with e2fsprogs test suite at the
moment.
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'debugfs/icheck.c')
0 files changed, 0 insertions, 0 deletions