#715743 [Mayhem] Bug report on cmatrix: cmatrix crashes with exit status 139

Package:
cmatrix
Source:
cmatrix
Description:
simulates the display from "The Matrix"
Submitter:
Alexandre Rebert
Date:
2023-08-25 18:27:03 UTC
Severity:
minor
Tags:
#715743#5
Date:
2013-07-10 15:32:31 UTC
From:
To:
cmatrix crashes with exit status 139. We confirmed the crash by
re-running it in a fresh debian unstable installation.

The attachment [1] contains a testcase (under ./crash) crashing the
program. It ensures that you can easily reproduce the bug. Additionally,
under ./crash_info/, we include more information about the crash such as
a core dump, the dmesg generated by the crash, and its output.

Regards,
The Mayhem Team (Alexandre Rebert, Thanassis Avgerinos, Sang Kil Cha, David Brumley, Manuel Egele)
Cylab, Carnegie Mellon University

[1] http://www.forallsecure.com/bug-reports/f62c1c34c4ab9d365ffd5a3f5292e577999e21dd/full_report

#715743#10
Date:
2014-03-16 14:09:23 UTC
From:
To:
tags unreproducible +unreproducible
thanks

#715743#15
Date:
2014-03-16 14:13:14 UTC
From:
To:
Hello,

I can't reproduce this bug using simple steps: just executing "cmatrix".
Are you still getting this error?

Thanks.

#715743#18
Date:
2014-03-16 19:17:27 UTC
From:
To:
* Diego Fernández Durán <diego@goedi.net>, 2014-03-16, 15:13:

It's unlikely that Alexandre saw you question if you didn't CC him. But
anyway...

As you noticed, this bug is not repducible my simply executing
"cmatrix"; but that's not what Alexandre wrote:

And indeed, if you run the script, cmatrix crashes.

I've debugged it a bit, and I think it only happens if TERM is unset.
This is not something that is likely to ever happen, so I changed
severity accordingly.

The minimal reproducer is:

$ env -u TERM cmatrix -f
Segmentation fault

I believe the culrpit is this line:

    if (force && strcmp("linux", getenv("TERM"))) {

If getenv() returns NULL, then strcmp() crashes.

#715743#27
Date:
2014-03-16 20:44:15 UTC
From:
To:
Sorry, I thought the BTS CCs the submitter automatically.

I've reached the same conclusion (now) compiling cmatrix with debug
symbols and running gdb. The problem is cmatrix is unmaintained upstream
since 2002. What do you suggest: must I do a simple patch, configure it
in the package and then send it upstream?

I'm trying to learn the right way to maintain packages. I appreciate
your critics :)

Thanks.

#715743#30
Date:
2014-03-18 10:50:09 UTC
From:
To:
* Diego Fernández Durán <diego@goedi.net>, 2014-03-16, 21:44:

I wouldn't say "must", but yes, that would be ideal.