Bug 1776784 - glfsheal crash on unexpected volume name
Summary: glfsheal crash on unexpected volume name
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: core
Version: mainline
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: bugs@gluster.org
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-11-26 11:47 UTC by Dmitry Antipov
Modified: 2023-09-14 05:47 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2019-12-05 10:45:22 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)
Proposal fix (1.92 KB, application/mbox)
2019-11-26 11:47 UTC, Dmitry Antipov
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Gluster.org Gerrit 23806 0 None Merged core: avoid NULL pointer dereference 2019-12-05 10:45:21 UTC

Internal Links: 1780190

Description Dmitry Antipov 2019-11-26 11:47:04 UTC
Created attachment 1639773 [details]
Proposal fix

# glfsheal nosuchvolume
Volume nosuchvolume does not exist
# glfsheal --oops
Segmentation fault (core dumped)

Comment 1 Ravishankar N 2019-12-04 12:21:01 UTC
Dmitry, glfsheal is not supposed to be invoked directly. You need to use the `gluster volume heal $VOLNAME` CLI only. That said, the fix seems to be a good check for gfapi programs that call "glfs_new($junk_volname)" causing it to crash. Can you send the attachment as a patch for review on gerrit? The work-flow is detailed at https://docs.gluster.org/en/latest/Developer-guide/Simplified-Development-Workflow/. Let me know if you need any help.

Comment 2 Worker Ant 2019-12-04 12:53:10 UTC
REVIEW: https://review.gluster.org/23806 (core: avoid NULL pointer dereference) posted (#1) for review on master by None

Comment 3 Dmitry Antipov 2019-12-04 12:55:16 UTC
(In reply to Ravishankar N from comment #1)

> Dmitry, glfsheal is not supposed to be invoked directly.

If so, shouldn't it be installed to (and invoked from) ${prefix}/libexec rather than ${prefix}/sbin?

Comment 4 Ravishankar N 2019-12-04 13:40:47 UTC
(In reply to Dmitry Antipov from comment #3)

> If so, shouldn't it be installed to (and invoked from) ${prefix}/libexec
> rather than ${prefix}/sbin?
Yes, correct. Feel free to send a patch if you would like to.

Comment 5 Worker Ant 2019-12-05 10:45:22 UTC
REVIEW: https://review.gluster.org/23806 (core: avoid NULL pointer dereference) merged (#3) on master by Xavi Hernandez

Comment 8 Red Hat Bugzilla 2023-09-14 05:47:37 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days


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