Bug 209587

Summary: Divide by zero in calc_stripe_length() with fuzzed image
Product: File System Reporter: Daniel Xu (dxu)
Component: btrfsAssignee: BTRFS virtual assignee (fs_btrfs)
Status: NEW ---    
Severity: low    
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: master (5.9) Subsystem:
Regression: No Bisected commit-id:
Attachments: repro

Description Daniel Xu 2020-10-09 00:43:40 UTC
Created attachment 292901 [details]
repro

There's a divide by zero error in calc_stripe_length() if you try to mount the attached image.

Note: the attached image is zstd compressed.
Comment 1 Daniel Xu 2020-10-09 18:34:06 UTC
I've got a fix up here: https://lore.kernel.org/linux-btrfs/20201009010910.270794-1-dxu@dxuuu.xyz/T/#u