Bug 200085

Summary: btrfs-progs: Infinite loop in btrfs receive --dump.
Product: File System Reporter: Adam Buchbinder (adam.buchbinder)
Component: btrfsAssignee: BTRFS virtual assignee (fs_btrfs)
Status: RESOLVED CODE_FIX    
Severity: normal CC: alexander198961, dsterba, jackysen422
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 4.9.0 Subsystem:
Regression: No Bisected commit-id:

Description Adam Buchbinder 2018-06-15 20:09:34 UTC
Execute the following on git HEAD:

printf 'btrfs-stream\0\0\0\0\0' | btrfs receive --dump

It looks like btrfs receive hits an infinite loop because it tries to read a token, fails without advancing the read pointer, then tries to read a token again, etc.

This bug was found using american fuzzy lop.
Comment 1 Oleksandr 2018-10-15 13:05:25 UTC
Created https://github.com/kdave/btrfs-progs/pull/151 and passed max_error_count to function
Comment 2 Oleksandr 2018-11-18 12:16:58 UTC
Is it possible to fix this issue as set up max retry count (for avoid infinity loop)? as I did in
https://github.com/kdave/btrfs-progs/pull/151/files
Comment 3 David Sterba 2019-05-15 14:48:54 UTC
Your fix is correct and has been merged to btrfs-progs. Thanks you both.
Comment 4 jacky 2019-10-08 14:55:03 UTC
why have you changed the topic? It was correct, the kernel loads only with noapic or noacpi. The problem is DSDT/SSDT tables can not load because of ALREADY_EXIST problem. They should be fixed by someone correctly. We provide the best window repairs & https://yorconstruction.com/window-installation/
 window installation specialists.