Several error use-after-free
Status from this message: I queued the part that hasn't been merged. Thanks!
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | scripts/coccinelle: add error-use-after-free.cocciMAINTAINERS scripts/ | +53 | 13 replies | |
| 2/6 | block/mirror: fix use after free of local_errblock/ | +1 | 9 replies | |
| 3/6 | dump/win_dump: fix use after free of errdump/ | +1 | 1 reply | |
| 4/6 | migration/colo: fix use after free of local_errmigration/ | +1 | 1 reply | |
| 5/6 | migration/ram: fix use after free of local_errmigration/ | +1 | 1 reply | |
| 6/6 | qga/commands-posix: fix use after free of local_errqga/ | +3 | 5 replies |
Reviews trailers per patch
5 of 6 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Richard Henderson | Eric Blake | John Snow | Dr. David Alan Gilbert | Markus Armbruster | Alberto Garcia |
|---|---|---|---|---|---|---|
| Series | R-b | |||||
| 1/6 | R-b | R-b | R-b | |||
| 2/6 | R-b | R-b | ||||
| 3/6 | R-b | |||||
| 4/6 | R-b | |||||
| 5/6 | R-b | |||||
| 6/6 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 6 reviewers.
Cover letter [PATCH for-5.0 0/6] Several error use-after-free
Hi all!
I accidentally found use-after-free of local_err in mirror, and decided to search for similar cases with help of small coccinelle script (patch 01). Happily, there no many cases.
Better to fix zero Error* pointer after each freeing everywhere, but this is too much for 5.0 and most of these cases will be covered by error-auto-propagation series.
Note also, that there are still a lot of use-after-free cases possible when error is not local variable but field of some structure, shared by several functions.
Vladimir Sementsov-Ogievskiy (6):
scripts/coccinelle: add error-use-after-free.cocci block/mirror: fix use after free of local_err dump/win_dump: fix use after free of err migration/colo: fix use after free of local_err migration/ram: fix use after free of local_err qga/commands-posix: fix use after free of local_err
scripts/coccinelle/error-use-after-free.cocci | 52 +++++++++++++++++++ block/mirror.c | 1 + dump/win_dump.c | 4 +- migration/colo.c | 1 + migration/ram.c | 1 + qga/commands-posix.c | 3 ++ MAINTAINERS | 1 + 7 files changed, 60 insertions(+), 3 deletions(-) create mode 100644 scripts/coccinelle/error-use-after-free.cocci
Signature · 1 line
2.21.0