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

speexenc encode wav file dos vulnerability #13

Closed
Aurorainfinity opened this issue Jul 13, 2020 · 2 comments
Closed

speexenc encode wav file dos vulnerability #13

Aurorainfinity opened this issue Jul 13, 2020 · 2 comments

Comments

@Aurorainfinity
Copy link

when speexenc encode wav file , deal with channels 0 will generate a Division by zero error which will cause the software crash
sample.tar.gz
usage :
speexenc sample -

vulnerability function:
static int read_samples(FILE *fin,int frame_size, int bits, int channels, int lsb, short * input, char *buff, spx_int32_t size)
{
unsigned char in[MAX_FRAME_BYTES
2];
int i;
short *s;
int nb_read;
size_t to_read;

if (size && *size<=0)
{
return 0;
}

to_read = bits/8channelsframe_size;

@tmatth
Copy link
Member

tmatth commented Jul 14, 2020

@Aurorainfinity thanks, there's a fix waiting for review here if you want to test it out:
https://gitlab.xiph.org/xiph/speex/-/merge_requests/1

FYI: We only use github as a mirror, that's why the MR is over on our gitlab instance.

@tmatth tmatth closed this as completed in 870ff84 Sep 22, 2020
@tmatth
Copy link
Member

tmatth commented Feb 11, 2022

Just to clarify, the code in question is not part of the libspeex library, it's only part of the speexenc example program.

@jlaine jlaine mentioned this issue Mar 25, 2022
6 tasks
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