Skip to content

[Backport][v1.72]Added #defined to force disable secure_getenv (#39343)#39715

Merged
sreenithi merged 1 commit intogrpc:v1.72.xfrom
pawbhard:1.72-bport-unsecure-getenv
May 30, 2025
Merged

[Backport][v1.72]Added #defined to force disable secure_getenv (#39343)#39715
sreenithi merged 1 commit intogrpc:v1.72.xfrom
pawbhard:1.72-bport-unsecure-getenv

Conversation

@pawbhard
Copy link
Copy Markdown
Contributor

@pawbhard pawbhard commented May 30, 2025

Backport #39343 to v1.72.x

Problem: secure_getenv return NULL if linux capabilities 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 man page

Closes #39343

COPYBARA_INTEGRATE_REVIEW=#39343 from pawbhard:getenv_wa 999f13a PiperOrigin-RevId: 760926719

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:22
@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
@sreenithi sreenithi self-requested a review May 30, 2025 07:33
@sreenithi
Copy link
Copy Markdown
Contributor

sreenithi commented May 30, 2025

Verified that the failing tests are unrelated to the change, so going ahead to approve, merge and proceed with the patch release.

@sreenithi sreenithi merged commit 54bd142 into grpc:v1.72.x May 30, 2025
58 of 62 checks passed
@pawbhard pawbhard deleted the 1.72-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