SegFault when Credentials assigned to Target have insufficient permissions

Hi,

I am using the containerized version of Greenbone OpenVAS and ran over this SegFault recently.

Setup:

  • Containerized version of OpenVAS Community Edition on Ubuntu 24.04
  • User A with role ‘User’ in Group B
  • Write Permission for Group B for the selected task X and its target Y

When I triggered the task it changed to status ‘Requested’ but immediately afterwards it changed to ‘Interrupted at 0%’ with this SegFault:

event task:MESSAGE:2026-09-09 12h56.13 utc:1720: Status of task MY_TASK_NAME (b4a5a615-1720-4bcb-a331-12aa05cac6fb) has changed to Requested
event task:MESSAGE:2026-09-09 12h56.13 utc:1720: Task MY_TASK_NAME (b4a5a615-1720-4bcb-a331-12aa05cac6fb) has been requested to start by XXXXXXXXXX
md main:MESSAGE:2026-09-09 12h56.13 utc:1722: BACKTRACE: gvmd(+0x150171) [0x5b6553045171]
md main:MESSAGE:2026-09-09 12h56.13 utc:1722: BACKTRACE: /lib/x86_64-linux-gnu/libc.so.6(+0x3fdf0) [0x7f73e07abdf0]
md main:MESSAGE:2026-09-09 12h56.13 utc:1722: BACKTRACE: gvmd(+0x1582ee) [0x5b655304d2ee]
md main:MESSAGE:2026-09-09 12h56.13 utc:1722: BACKTRACE: gvmd(+0x15c489) [0x5b6553051489]
md main:MESSAGE:2026-09-09 12h56.13 utc:1722: BACKTRACE: gvmd(+0xc0816) [0x5b6552fb5816]
md main:MESSAGE:2026-09-09 12h56.13 utc:1722: BACKTRACE: gvmd(+0xc20f4) [0x5b6552fb70f4]
md main:MESSAGE:2026-09-09 12h56.13 utc:1722: BACKTRACE: gvmd(+0xa5f62) [0x5b6552f9af62]
md main:MESSAGE:2026-09-09 12h56.13 utc:1722: BACKTRACE: gvmd(+0x84e05) [0x5b6552f79e05]
md main:MESSAGE:2026-09-09 12h56.13 utc:1722: BACKTRACE: /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x62612) [0x7f73e0aa7612]
md main:MESSAGE:2026-09-09 12h56.13 utc:1722: BACKTRACE: /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_markup_parse_context_parse+0xc12) [0x7f73e0aa8312]
md main:MESSAGE:2026-09-09 12h56.13 utc:1722: BACKTRACE: gvmd(+0x95181) [0x5b6552f8a181]
md main:MESSAGE:2026-09-09 12h56.13 utc:1722: BACKTRACE: gvmd(+0x15619c) [0x5b655304b19c]
md main:MESSAGE:2026-09-09 12h56.13 utc:1722: BACKTRACE: gvmd(+0x150371) [0x5b6553045371]
md main:MESSAGE:2026-09-09 12h56.13 utc:1722: BACKTRACE: gvmd(+0x150a51) [0x5b6553045a51]
md main:MESSAGE:2026-09-09 12h56.13 utc:1722: BACKTRACE: gvmd(+0x1552c5) [0x5b655304a2c5]
md main:MESSAGE:2026-09-09 12h56.13 utc:1722: BACKTRACE: /lib/x86_64-linux-gnu/libc.so.6(+0x29ca8) [0x7f73e0795ca8]
md main:MESSAGE:2026-09-09 12h56.13 utc:1722: BACKTRACE: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x85) [0x7f73e0795d65]
md main:MESSAGE:2026-09-09 12h56.13 utc:1722: BACKTRACE: gvmd(+0x5ab01) [0x5b6552f4fb01]
md manage:MESSAGE:2026-09-09 12h56.13 utc:1722: Received Segmentation fault signal
md manage:WARNING:2026-09-09 12h56.13 utc:1722: manage_cleanup_process_error: Error exit, setting running task to Interrupted
event task:MESSAGE:2026-09-09 12h56.13 utc:1722: Status of task MY_TASK_NAME (b4a5a615-1720-4bcb-a331-12aa05cac6fb) has changed to Interrupted

The good thing is, that I was able to identify (and fix) the root cause. Apparently, the credentials Z assigned to the given target Y had no read (and also no write) permissions for the given group B. After granting read permissions for group B to credentials Z, I was able to start task X with user A.

I’m reporting this finding, as I believe that a segmentation fault prevention would be a good thing. Also a dedicated error message would improve finding the root cause.

BR,
Peter

@pete

It appears to be crashing somewhere, but we would need to run a debug build to see the root cause more clearly.

Could you provide step-by-step instructions on how to reproduce the issue? Alternatively, could you run the same test using a debug build and share the output or any error messages it produces? That would help identify the problem more accurately.

Eero

Hi @Eero,
thanks for your response.
Could I just pull the debug build by adapting my compose.yaml? E.g. by updating
gvmd:
image: ``registry.community.greenbone.net/community/gvmd:stable

If so, I could pull the image, restart and try to reproduce the situation, and immediately revert back to stable afterwards.

Just to mention: I am very limited in the URIs for the available images.

BR,
Peter

@pete

I don’t think a debug build is available there. If I remember correctly, I have a script on Debian that builds a debug version directly from source.

It’s not intended for a Docker-based environment, but I would expect the same issue to occur there as well. Running a debug build should provide more detailed diagnostic information and help pinpoint the root cause of the crash.

Eero

@pete can you share video with step by step instructions to re produce issue? I can then test it my debug build or can you test it with my environment?

Eero

Hi @Eero I will share the “Steps to reproduce”:

Steps to reproduce

  • Setup up Greenbone OpenVAS
  • Create an User “MyAdmin” with Role Admin with the Superadmin
  • Create a Credential (User/PW) “MyCredential” with MyAdmin
  • Create a Target “MyTarget” (Single IP, Ports: All IANA assigned TCP, Alive Test: ICMP Ping) which uses the previously created Credentials “MyCredential”
  • Create a task “MyTask” that scans the previously generated target “MyTarget” (everything else default values)
  • Create a user “MySubAdmin” with Role Admin
  • Start the task “MyTask” with user “MyAdmin”

Status: Task will be Requested, Queued and Run until completion

  • Logout user “MyAdmin”
  • Login as user “MySubAdmin”
  • Start the task “MyTask”

Status: Task will be Requested, Queued and Run until completion

Remark: my regularly updated greenbone instance ran w/o groups in this setup for months sucessfully. I then introduced groups:

  • Logout user “MySubAdmin”
  • Login user “MyAdmin”
  • Create a group “MyGroup” (enable '“Special Group”)
  • Add users “MyAdmin” and “MySubAdmin” to this group
  • For task “MyTask”, grant Write permissions to group “MyGroup” (i.e., get_tasks, modify_tasks, resume_tasks, start_task, stop_task)
  • For target “MyTarget”, grant Write permissions to group “MyGroup” (i.e., get_targets, modify_targets)
  • Logout user “MyAdmin”
  • Login as user “MySubAdmin”
  • Start task “MyTask”

:double_exclamation_mark: Task will be Requested and immediately set to Interrupted at 0%. The log will show the segfault posted above :double_exclamation_mark:

  • Logout user “MySubAdmin”
  • Login user “MyAdmin”
  • Grant read permissions for group “MyGroup” to credential “MyCredential” (i.e. get_credentials)
  • Logout user “MyAdmin”
  • Login as user “MySubAdmin”
  • Start the task “MyTask”

Status: Task will be Requested, Queued and Run until completion

@pete

I couldn’t reproduce this with the latest GitHub version — or I may have misunderstood the instructions. Just to confirm, does your machine have enough RAM and swap available, at least 16 GB?

Eero

@pete

Could you use this script to build a debug version of OpenVAS and verify whether the problem is reproducible?

Please make sure the system has 20 GB of RAM available. I’ve encountered many similar stack dumps in the past, and in a surprising number of cases they were caused by memory exhaustion rather than the underlying application itself. It would be good to eliminate that possibility first.

https://pastebin.com/jykXXbfL works at least on debian 13.

Eero

@Eero
I checked the resources of the (virtual) server - it seems that at the moment 16 GBs RAM are assigned, I will try to get more.
Once I got more RAM, I will try to reproduce the issue and report the result back here.
Unfortunately, I am limited in what I can do on this server as it is a managed server, where I have limited permissions only.
In the meantime, I will try to reproduce the problem on another machine. If I am able to reproduce, I will checkout the script you provided for building the custom build.
BR,
Peter

@pete

I would also recommend adding more swap space, for example by expanding the swap file. With 16 GB of physical memory, a swap file of at least 10 GB is a sensible baseline, especially for memory-intensive workloads, as it can help prevent out-of-memory situations and improve overall system stability.

Eero

@Eero
I was able to scale the virtual server to 24GBs of RAM (Swap however remained at 2GBs).
I retested the scenario:

  • On the credential “MyCredential”, remove get_credentials permissions (i.e. read permissions) for the user group “MyGroup”
  • Logout as “MyAdmin” and login as user “MySubAdmin” (member of “MyGroup”)
  • Start Task

event task:MESSAGE:2026-09-11 07h54.53 utc:205252: Status of task MY_TASK (b4a5a615-1720-4bcb-a331-12aa05cac6fb) has changed to Requested
event task:MESSAGE:2026-09-11 07h54.53 utc:205252: Task MY_TASK (b4a5a615-1720-4bcb-a331-12aa05cac6fb) has been requested to start by XXXXXXXXX
md main:MESSAGE:2026-09-11 07h54.53 utc:205254: BACKTRACE: gvmd(+0x150171) [0x5b6553045171]
md main:MESSAGE:2026-09-11 07h54.53 utc:205254: BACKTRACE: /lib/x86_64-linux-gnu/libc.so.6(+0x3fdf0) [0x7f73e07abdf0]
md main:MESSAGE:2026-09-11 07h54.53 utc:205254: BACKTRACE: gvmd(+0x1582ee) [0x5b655304d2ee]
md main:MESSAGE:2026-09-11 07h54.53 utc:205254: BACKTRACE: gvmd(+0x15c489) [0x5b6553051489]
md main:MESSAGE:2026-09-11 07h54.53 utc:205254: BACKTRACE: gvmd(+0xc0816) [0x5b6552fb5816]
md main:MESSAGE:2026-09-11 07h54.53 utc:205254: BACKTRACE: gvmd(+0xc20f4) [0x5b6552fb70f4]
md main:MESSAGE:2026-09-11 07h54.53 utc:205254: BACKTRACE: gvmd(+0xa5f62) [0x5b6552f9af62]
md main:MESSAGE:2026-09-11 07h54.53 utc:205254: BACKTRACE: gvmd(+0x84e05) [0x5b6552f79e05]
md main:MESSAGE:2026-09-11 07h54.53 utc:205254: BACKTRACE: /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x62612) [0x7f73e0aa7612]
md main:MESSAGE:2026-09-11 07h54.53 utc:205254: BACKTRACE: /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_markup_parse_context_parse+0xc12) [0x7f73e0aa8312]
md main:MESSAGE:2026-09-11 07h54.53 utc:205254: BACKTRACE: gvmd(+0x95181) [0x5b6552f8a181]
md main:MESSAGE:2026-09-11 07h54.53 utc:205254: BACKTRACE: gvmd(+0x15619c) [0x5b655304b19c]
md main:MESSAGE:2026-09-11 07h54.53 utc:205254: BACKTRACE: gvmd(+0x150371) [0x5b6553045371]
md main:MESSAGE:2026-09-11 07h54.53 utc:205254: BACKTRACE: gvmd(+0x150a51) [0x5b6553045a51]
md main:MESSAGE:2026-09-11 07h54.53 utc:205254: BACKTRACE: gvmd(+0x1552c5) [0x5b655304a2c5]
md main:MESSAGE:2026-09-11 07h54.53 utc:205254: BACKTRACE: /lib/x86_64-linux-gnu/libc.so.6(+0x29ca8) [0x7f73e0795ca8]
md main:MESSAGE:2026-09-11 07h54.53 utc:205254: BACKTRACE: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x85) [0x7f73e0795d65]
md main:MESSAGE:2026-09-11 07h54.53 utc:205254: BACKTRACE: gvmd(+0x5ab01) [0x5b6552f4fb01]
md manage:MESSAGE:2026-09-11 07h54.53 utc:205254: Received Segmentation fault signal
md manage:WARNING:2026-09-11 07h54.53 utc:205254: manage_cleanup_process_error: Error exit, setting running task to Interrupted

Unfortunately, I am pretty limited on what I can download or execute on this machine, so I need to setup a separate machine with similar setup in order to create and run the custom build.

BR,
Peter

@pete well. I can probably also build images, if needed.

Eero

@pete I will share google drive link to prebuild images with docker compose file.

I just updated to the latest stable version (UI shows 28.4.0) and the behavior is gone.

  • I removed with an admin user every permission on the credential used by the target of interest, but kept permissions for a given group on the task and target itself.

  • I then logged out and logged in as another user with role ‘Admin’ (being member of the group I just removed permissions from the credential).

  • Now, the credential is still visible in the UI to the user (different behavior compared to 2 weeks ago) and I am able to run the scan task on the target.

  • Then I logged out and logged in as another user with role ‘User’ (being member of the group I just removed permissions from the credential).

  • Now, the credential is not visible in the UI to the user but I am also able to run the scan task on the target.

Thanks @Eero for your support!

BR,
Peter

1 Like

@pete please mark this as resolved.

Eeero