Bug 200085 - btrfs-progs: Infinite loop in btrfs receive --dump.
Summary: btrfs-progs: Infinite loop in btrfs receive --dump.
Status: RESOLVED CODE_FIX
Alias: None
Product: File System
Classification: Unclassified
Component: btrfs (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: BTRFS virtual assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-15 20:09 UTC by Adam Buchbinder
Modified: 2019-10-08 14:55 UTC (History)
3 users (show)

See Also:
Kernel Version: 4.9.0
Subsystem:
Regression: No
Bisected commit-id:


Attachments

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.

Note You need to log in before you can comment on or make changes to this bug.