Closed Bug 1794309 Opened 2 years ago Closed 2 years ago

Nvidia/Linux: Crash in [@ getenv]

Categories

(Core :: Graphics: WebRender, defect)

x86_64
Linux
defect

Tracking

()

RESOLVED DUPLICATE of bug 1752703

People

(Reporter: sefeng, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: crash, topcrash, topcrash-startup)

Crash Data

Crash report: https://crash-stats.mozilla.org/report/index/949c820b-c629-4b0f-88c0-979120221009

Reason: SIGSEGV / SI_KERNEL

Top 10 frames of crashing thread:

0 libc.so.6 getenv /usr/src/debug/glibc/stdlib/getenv.c:84
1 libnvidia-eglcore.so.515.65.01 _glNamedBufferAttachMemoryNV 
2 libnvidia-eglcore.so.515.65.01 NvGlEglGetFunctions 
3 libnvidia-eglcore.so.515.65.01 _glNamedBufferAttachMemoryNV 
4 libnvidia-eglcore.so.515.65.01 _glNamedBufferAttachMemoryNV 
5 libnvidia-eglcore.so.515.65.01 _glNamedBufferAttachMemoryNV 
6 libnvidia-eglcore.so.515.65.01 NvGlEglApiInit 
7 libnvidia-eglcore.so.515.65.01 NvGlEglApiInit 
8 libEGL_nvidia.so.0 NvEglwlaf47906in 
9 libEGL_nvidia.so.0 NvEglwlaf47906in 

Just hit this crash in 20221009094451 Nightly twice this morning.

Blocks: wr-nv-linux
OS: Unspecified → Linux
Hardware: Unspecified → x86_64
See Also: → 1784813
Summary: Crash in [@ getenv] → Nvidia/Linux: Crash in [@ getenv]

The bug is linked to a topcrash signature, which matches the following criterion:

  • Top 5 desktop browser crashes on Linux on release (startup)

For more information, please visit auto_nag documentation.

The most recent of these crashes are often UAF e5e5 crashes, starting on 2022/11/02. Before that they were all nullptr.

They UAFs seem to be caused by bugs in gfx drivers, in particular libnvidia-eglcore.so.515, libnvidia-eglcore.so.470, libgallium, and libnvidia-glsi.so.515

getenv() is a footgun in multithreaded code; any pointer it returns can become a UAF if some other thread modifies the environment. Likely the nullptr crashes were just safer variants of the same footgun.

Very likely there's nothing we can do to fix this. Note also that most of these are startup crashes; I don't know what the fallback is or if these bad drivers can cause perma-crash on startup, which would be bad.

Group: gfx-core-security
Crash Signature: [@ getenv] → [@ getenv] [@ _glNamedBufferAttachMemoryNV ]

I'm duplicating this against bug 1752703 because they're basically the same crash and require the same solution (namely not calling setenv() in our code, or making a getenv() wrapper that leaks the returned string).

Status: NEW → RESOLVED
Closed: 2 years ago
Duplicate of bug: 1752703
Resolution: --- → DUPLICATE

I'm not really a programmer, but I assume this could be related to bug 1784813 and it could be worth a try

Thanks, this wouldn't solve the problem since we have other calls but it would at least mitigate it.

__GL_ALLOW_FXAA_USAGE=0 even caused an unexpected slowdown: bug 1736245

Group: gfx-core-security
You need to log in before you can comment on or make changes to this bug.