diff options
| author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-11-28 17:57:55 -0500 |
|---|---|---|
| committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-12-21 01:36:20 -0500 |
| commit | f7f196170dcd7c629126ee9d37be5dbdb6d4f941 (patch) | |
| tree | 813edd6ce30168c80792365fbe9617b1e2a3236f | |
| parent | 4746ee182a76bbe4dd847180b0c8b575756b0d0d (diff) | |
| download | linux-f7f196170dcd7c629126ee9d37be5dbdb6d4f941.tar.gz linux-f7f196170dcd7c629126ee9d37be5dbdb6d4f941.zip | |
bcachefs: cryptographic MACs on superblock are not (yet?) supported
We should add support for cryptographic macs on the superblock - and it
won't be hard, but it'll need an incompatible feature bit (and we have a
new incompatible feature versioning scheme coming).
For now, just add a guard to avoid a dull ptr deref in gen_poly_key().
Reported-by: syzbot+dd3d9835055dacb66f35@syzkaller.appspotmail.com
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
| -rw-r--r-- | fs/bcachefs/super-io.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/bcachefs/super-io.c b/fs/bcachefs/super-io.c index 4c29f8215d54..6a086c1c4b14 100644 --- a/fs/bcachefs/super-io.c +++ b/fs/bcachefs/super-io.c @@ -677,7 +677,8 @@ reread: } enum bch_csum_type csum_type = BCH_SB_CSUM_TYPE(sb->sb); - if (csum_type >= BCH_CSUM_NR) { + if (csum_type >= BCH_CSUM_NR || + bch2_csum_type_is_encryption(csum_type)) { prt_printf(err, "unknown checksum type %llu", BCH_SB_CSUM_TYPE(sb->sb)); return -BCH_ERR_invalid_sb_csum_type; } |
