Skip to content

[Backport][v1.71]Added #defined to force disable secure_getenv (#39343)#39716

Merged
pawbhard merged 1 commit intogrpc:v1.71.xfrom
pawbhard:1.71-bport-unsecure-getenv
May 30, 2025
Merged

[Backport][v1.71]Added #defined to force disable secure_getenv (#39343)#39716
pawbhard merged 1 commit intogrpc:v1.71.xfrom
pawbhard:1.71-bport-unsecure-getenv

Conversation

@pawbhard
Copy link
Copy Markdown
Contributor

@pawbhard pawbhard commented May 30, 2025

Backport #39343 to 1.71.

Problem: [secure_getenv](https://github.com/grpc/grpc/blob/2dd25392e8951c000eee2f35c9fe66862f9c8883/src/core/util/linux/env.cc#L41) return NULL  if linux [capabilities](https://man7.org/linux/man-pages/man7/capabilities.7.html) are added to the executable.

As a solution, adding the "GRPC_FORCE_INSECURE_GETENV"

We want to discourage its use due to security vulnerabilities mentioned in the [secure_getenv](https://github.com/grpc/grpc/blob/2dd25392e8951c000eee2f35c9fe66862f9c8883/src/core/util/linux/env.cc#L41) man page

Closes grpc#39343

COPYBARA_INTEGRATE_REVIEW=grpc#39343 from pawbhard:getenv_wa 999f13a
PiperOrigin-RevId: 760926719
@pawbhard pawbhard requested a review from markdroth May 30, 2025 04:23
@pawbhard pawbhard self-assigned this May 30, 2025
@pawbhard pawbhard added the release notes: no Indicates if PR should not be in release notes label May 30, 2025
@pawbhard pawbhard merged commit 738a2b0 into grpc:v1.71.x May 30, 2025
56 of 62 checks passed
@pawbhard pawbhard deleted the 1.71-bport-unsecure-getenv branch June 4, 2025 04:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants