Skip to content

Add GNMI client cert cname check support. (#18709)#1414

Closed
FengPan-Frank wants to merge 411 commits intoAzure:202412from
FengPan-Frank:telemetry_cert_cherrypick
Closed

Add GNMI client cert cname check support. (#18709)#1414
FengPan-Frank wants to merge 411 commits intoAzure:202412from
FengPan-Frank:telemetry_cert_cherrypick

Conversation

@FengPan-Frank
Copy link
Contributor

Add GNMI client cert cname list to yang model.

Allow gnmi service authentication client cert by cname.

Add GNMI client cert cname list to yang model.

Pass all UT.

Add GNMI client cert cname list to yang model.

Why I did it

Work item tracking
  • Microsoft ADO (number only):

How I did it

How to verify it

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

sonic-build and others added 30 commits September 20, 2022 23:01
jon-nokia and others added 21 commits August 31, 2023 13:53
…ability. (#15512)

Why I did it
#15284 fixes a case of shell escape exploit for TACACS+. This applies to RADIUS as well. RADIUS creates an unconfirmed user locally on the switch while attempting authentication. popen() is used to execute useradd,usermod and userdel commands. This exposes a vulnerability where a tactically designed username (which could contain explicit linux commands) can lead to getting executed as root.

An example of such a username could be "asd";echo>remoteRCE2;#". This leads to remoteRCE2 getting created in "/".

How I did it
All calls to popen() used to execute useradd, usermod and userdel are replaced with fork()/execl().

How to verify it
Prior to the fix, following is the behavior:

[s@i vm] ssh "asd";echo>remoteRCE2;#"@1.1.1.1
asd";echo>remoteRCE2;#@1.1.1.1's password:
Permission denied, please try again.

On the SONiC switch,

root@sonic:/# ls
accton_as7816_monitor.log home lib64 remoteRCE2 sys
bin host libx32 root tmp
boot initrd.img media run usr
cache.tgz initrd.img.old mnt sbin var
dev lib opt sonic vmlinuz
etc lib32 proc srv vmlinuz.old
root@sonic:/# ls -l

With the fix:

[s@i vm] ssh "asd";echo>remoteRCE2;#"@1.1.1.1
asd";echo>remoteRCE2;#@1.1.1.1's password:
Permission denied, please try again.

root@sonic:/# ls
accton_as7816_monitor.log etc lib mnt sbin usr
bin home lib32 opt sonic var
boot host lib64 proc srv vmlinuz
cache.tgz initrd.img libx32 root sys vmlinuz.old
dev initrd.img.old media run tmp

Verified that RADIUS authentication works as expected for valid users as well.
[radius]: Use execl instead of popen in RADIUS NSS code to fix vulner…
Replace char* and C string functions with C++ strings.
[ssg]: Use C++ strings for text handling (#18596)
This pr is auto merged as it contains a mandatory file and is opened for more than 10 days.
Add GNMI client cert cname list to yang model.

Allow gnmi service authentication client cert by cname.

Add GNMI client cert cname list to yang model.

Pass all UT.

Add GNMI client cert cname list to yang model.
@qiluo-msft qiluo-msft requested a review from liuh-80 July 30, 2025 00:19
@qiluo-msft
Copy link
Member

Is it a straightforward (clean) cherry-pick of 18709?

@FengPan-Frank FengPan-Frank changed the base branch from master to 202412 July 30, 2025 00:26
@FengPan-Frank FengPan-Frank requested a review from lguohan as a code owner July 30, 2025 00:26
@FengPan-Frank FengPan-Frank marked this pull request as draft July 30, 2025 00:28
@FengPan-Frank
Copy link
Contributor Author

Is it a straightforward (clean) cherry-pick of 18709?

#1416, use this instead.

rameshraghupathy pushed a commit to rameshraghupathy/sonic-buildimage-msft that referenced this pull request Dec 10, 2025
…tically (#19911)

#### Why I did it
src/sonic-sairedis
```
* 45ff42c3 - (HEAD -> master, origin/master, origin/HEAD) run VS tests in parallel (Azure#1414) (3 hours ago) [Lawrence Lee]
```
#### How I did it
#### How to verify it
#### Description for the changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.