Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion failed (core dumped) at sox/src/formats.c:227 #3508

Closed
hkctkuy opened this issue Jul 27, 2023 · 1 comment
Closed

Assertion failed (core dumped) at sox/src/formats.c:227 #3508

hkctkuy opened this issue Jul 27, 2023 · 1 comment

Comments

@hkctkuy
Copy link

hkctkuy commented Jul 27, 2023

🐛 Describe the bug

Hi, I've been fuzzing torchaudio project with sydr-fuzz and found crash at sox/src/formats.c:227.

I think that assertion fails because sox_append_comment() function accepts "" string as a second argument from metadata->data.vorbis_comment.comments[i].entry in /audio/build/third_party/sox/src/sox/src/flac.c:133.

How to reproduce

  1. Build docker from here and run the container:
 sudo docker build -t oss-sydr-fuzz-torchaudio .
 sudo docker run --privileged --rm -v `pwd`:/fuzz -it oss-sydr-fuzz-torchaudio /bin/bash
  1. Run the target on this input: crash-55b22b3ea8bdcd9831675d58d11741a9ae985fb3
/load_audio_afl crash-55b22b3ea8bdcd9831675d58d11741a9ae985fb3
  1. You will see the following output:
Reading 4533 bytes from crash-55b22b3ea8bdcd9831675d58d11741a9ae985fb3
load_audio_afl: /audio/build/third_party/sox/src/sox/src/formats.c:227: void sox_append_comment(sox_comments_t *, const char *): Assertion `comment' failed.
Aborted (core dumped)

Versions

torchaudio version: 30afaa9
pytorch version: 0f1621df1a0a73956c7ce4e2f72f069e610e0137
sox version: 14.4.2
OS: Ubuntu 20.04

@mthrok
Copy link
Collaborator

mthrok commented Jul 28, 2023

#3497 has landed, and now torchaudio links to sox dynamically. We no longer compile the specified code by ourselves and therefore this issue is now irrelevant.

Feel free to fuzz the code under torchaudio/csrc, and report issues there. Thanks,

@mthrok mthrok closed this as completed Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants