envoyproxy / envoyproxy/envoy

Crash in cache filter

Open
#40,469 3 comments 1 reaction 0 assignees View on GitHub
area/cache bug no stalebot
Dominant language
C++
Stars
28.9k
Forks
5.6k
Avg merge
1d 20h
Merged PRs (30d)
428

Description

From ales.bukovsky@gmail.com

I am running into a segmentation fault crash with the Envoy Proxy 1.34 and CacheConfig filter. The problem appears related to "allowed-vary-headers" configuration. Specifically, during the processing of the response from upstream (I can see the request processed in the upstream logs). It appears to choke on the presence of the "Vary" header in the response, its value doesn't seem relevant (even non-matching value cause the error). The upstream response supplies following headers:

HTTP/1.1 200 OK
date: Wed, 21 May 2025 13:55:53 GMT
server: uvicorn
content-length: 32
content-type: application/json
vary: x-user-id
cache-control: public, max-age=180

My test config is attached. The curl command to reproduce:

curl -i -H "x-user-id: 11111" GET http://localhost:8080/permissions

The error from the console:

```
[2025-05-20T22:05:40.260Z] "GET /permissions HTTP/1.1" 200 - 0 32 4 3 "172.17.0.2" "curl/8.7.1" "0b25be26-edb3-43cc-8e1e-244a7264234e" "localhost:8080" "-"
[2025-05-20 22:05:40.265][34][critical][backtrace] [./source/server/backtrace.h:129] Caught Segmentation fault, suspect faulting address 0x0
[2025-05-20 22:05:40.265][34][critical][backtrace] [./source/server/backtrace.h:113] Backtrace (use tools/stack_decode.py to get line numbers):
[2025-05-20 22:05:40.265][34][critical][backtrace] [./source/server/backtrace.h:114] Envoy version: c435eeccd4201f8d6a200922b166f5dcee08272b/1.34.1/Clean/RELEASE/BoringSSL
[2025-05-20 22:05:40.265][34][critical][backtrace] [./source/server/backtrace.h:116] Address mapping: aaaacd765000-aaaad0079000 /usr/local/bin/envoy
[2025-05-20 22:05:40.265][34][critical][backtrace] [./source/server/backtrace.h:121] #0: __kernel_rt_sigreturn [0xffffbc4097a0]
[2025-05-20 22:05:40.265][34][critical][backtrace] [./source/server/backtrace.h:123] #1: [0xaaaacf925e28]
[2025-05-20 22:05:40.265][34][critical][backtrace] [./source/server/backtrace.h:123] #2: [0xaaaacf911bdc]
[2025-05-20 22:05:40.265][34][critical][backtrace] [./source/server/backtrace.h:123] #3: [0xaaaace18b1b4]
[2025-05-20 22:05:40.265][34][critical][backtrace] [./source/server/backtrace.h:123] #4: [0xaaaace185118]
[2025-05-20 22:05:40.265][34][critical][backtrace] [./source/server/backtrace.h:123] #5: [0xaaaace187754]
[2025-05-20 22:05:40.265][34][critical][backtrace] [./source/server/backtrace.h:123] #6: [0xaaaace1871a0]
[2025-05-20 22:05:40.265][34][critical][backtrace] [./source/server/backtrace.h:123] #7: [0xaaaacda13d78]
[2025-05-20 22:05:40.265][34][critical][backtrace] [./source/server/backtrace.h:123] #8: [0xaaaacda137f4]
[2025-05-20 22:05:40.265][34][critical][backtrace] [./source/server/backtrace.h:123] #9: [0xaaaacf8394a4]
[2025-05-20 22:05:40.265][34][critical][backtrace] [./source/server/backtrace.h:123] #10: [0xaaaacfb087f0]
[2025-05-20 22:05:40.265][34][critical][backtrace] [./source/server/backtrace.h:123] #11: [0xaaaacfb073f4]
[2025-05-20 22:05:40.265][34][critical][backtrace] [./source/server/backtrace.h:123] #12: [0xaaaacf0a25fc]
[2025-05-20 22:05:40.265][34][critical][backtrace] [./source/server/backtrace.h:123] #13: [0xaaaacfb17188]
[2025-05-20 22:05:40.265][34][critical][backtrace] [./source/server/backtrace.h:123] #14: [0xffffbc19d5b8]
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.