Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Syft hangs when encounting symlink (in /run/udev/) to a character device (in /dev/) #665

@cameronkerrnz

Description

@cameronkerrnz

What happened:

Given a desire to scan a host
When it reaches a symlink that point to a character special device that would block on read
It hangs

What you expected to happen:

Given a desire to scan a host
When it reaches a symlink that point to a character special device (OR a socket) [that could block on read]
It should skip it as unreadable and continue to completion.

How to reproduce it (as minimally and precisely as possible):

On a machine with a sound driver (I couldn't think of other characters that would be likely to block on read for a CI/CD environment).

syft packages dir:/run/

Hangs when Indexing file:/run/udev/static_node-tags/uaccess/snd\x2fseq

/run/udev/static_node-tags/uaccess/snd\x2fseq is a symlink to /dev/snd/seq, which is a character device

strace shows syft doing the following

image

It would appear that syft is correctly detecting the symlink, but then not doing the check (that it would normally do if I run syft against file:/dev/snd/seq) in detecting it as character special device.

Anything else we need to know?:

Environment:

  • Output of syft version: Version 0.32.0

Downloaded today from GitHub release using install.sh script from this repository.

image

  • OS (e.g: cat /etc/os-release or similar):

Red Hat Enterprise Linux release 8.4 (Ootpa) --- running as a graphical workstation with sound capability.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingduplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions