Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(amf): Added Security Indication IE #15312

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

shashidhar-patil
Copy link
Contributor

@shashidhar-patil shashidhar-patil commented Sep 27, 2023

Summary

Issue: MME rejected gNB registration

Observations from Pcap comparison:

  • Security indication IE missing in magma pcap

Implemented security indication IE.

Test Plan

Tested with UERANSIM for service request scenario.
Attached Pcap and Logs: logs.zip

Screenshot from 2023-09-27 17-31-39

Additional Information

  • This change is backwards-breaking

Security Considerations

@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines. label Sep 27, 2023
@github-actions
Copy link
Contributor

Thanks for opening a PR! 💯

A couple initial guidelines

Howto

  • Reviews. The "Reviewers" listed for this PR are the Magma maintainers who will shepherd it.
  • Checks. All required CI checks must pass before merge.
  • Merge. Once approved and passing CI checks, use the ready2merge label to indicate the maintainers can merge your PR.

More info

Please take a moment to read through the Magma project's

If this is your first Magma PR, also consider reading

@github-actions github-actions bot added the component: agw Access gateway-related issue label Sep 27, 2023
@github-actions
Copy link
Contributor

Bazel unit-test results --config=production

    1 files  ±    0    86 suites   - 43   3m 22s ⏱️ -3s
412 tests  - 193  412 ✔️  - 193  0 💤 ±0  0 ±0 
413 runs   - 193  413 ✔️  - 193  0 💤 ±0  0 ±0 

Results for commit ad55f8e. ± Comparison against base commit 81e4e77.

This pull request removes 193 tests.
ChargingGrantTest ‑ test_get_action
ChargingGrantTest ‑ test_get_action_redirect
ChargingGrantTest ‑ test_get_action_restrict
ChargingGrantTest ‑ test_get_update_type
ChargingGrantTest ‑ test_marshal
ChargingGrantTest ‑ test_should_deactivate_service
ChargingGrantTest ‑ test_tolerance_quota_exhausted
EventHandlerTest ‑ test_event_handler_close_assoc
EventHandlerTest ‑ test_event_handler_new_assoc
EventHandlerTest ‑ test_event_handler_send_ul
…

@github-actions
Copy link
Contributor

github-actions bot commented Sep 27, 2023

Bazel unit-test results --config=production

1 files  ±    0  0 suites   - 129   0s ⏱️ - 3m 20s
0 tests  - 608  0 ✔️  - 608  0 💤 ±0  0 ±0 
0 runs   - 609  0 ✔️  - 609  0 💤 ±0  0 ±0 

Results for commit afd4b58. ± Comparison against base commit 50e0d51.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 27, 2023

Bazel unit-test results --config=asan

1 files  ±    0  0 suites   - 129   0s ⏱️ - 3m 20s
0 tests  - 608  0 ✔️  - 608  0 💤 ±0  0 ±0 
0 runs   - 609  0 ✔️  - 609  0 💤 ±0  0 ±0 

Results for commit afd4b58. ± Comparison against base commit 50e0d51.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

Bazel unit-test results

    1 files  ±    0    86 suites   - 146   3m 9s ⏱️ -17s
412 tests  - 314  412 ✔️  - 314  0 💤 ±0  0 ±0 
413 runs   - 314  413 ✔️  - 314  0 💤 ±0  0 ±0 

Results for commit ad55f8e. ± Comparison against base commit 81e4e77.

This pull request removes 314 tests.
ChargingGrantTest ‑ test_get_action
ChargingGrantTest ‑ test_get_action_redirect
ChargingGrantTest ‑ test_get_action_restrict
ChargingGrantTest ‑ test_get_update_type
ChargingGrantTest ‑ test_marshal
ChargingGrantTest ‑ test_should_deactivate_service
ChargingGrantTest ‑ test_tolerance_quota_exhausted
EventHandlerTest ‑ test_event_handler_close_assoc
EventHandlerTest ‑ test_event_handler_new_assoc
EventHandlerTest ‑ test_event_handler_send_ul
…

@github-actions
Copy link
Contributor

github-actions bot commented Sep 27, 2023

Bazel unit-test results

0 tests   0 ✔️  0s ⏱️
0 suites  0 💤
1 files    0

Results for commit afd4b58.

♻️ This comment has been updated with latest results.

@@ -1135,6 +1135,31 @@ int ngap_fill_pdu_session_resource_setup_request_transfer(
qos_flow_add_or_modify_request_list_t* qos_list =
&session_transfer->qos_flow_add_or_mod_request_list;

/*Security Indication*/
transfer_request_ie =
(Ngap_PDUSessionResourceSetupRequestTransferIEs_t*)calloc(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[cpplint] reported by reviewdog 🐶
Using C-style cast. Use reinterpret_cast<Ngap_PDUSessionResourceSetupRequestTransferIEs_t*>(...) instead [readability/casting] [4]

Ngap_ConfidentialityProtectionIndication_preferred;
Ngap_MaximumIntegrityProtectedDataRate_t*
Ngap_MaximumIntegrityProtectedDataRate =
(Ngap_MaximumIntegrityProtectedDataRate_t*)calloc(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[cpplint] reported by reviewdog 🐶
Using C-style cast. Use reinterpret_cast<Ngap_MaximumIntegrityProtectedDataRate_t*>(...) instead [readability/casting] [4]

@lucasgonze
Copy link
Contributor

Can you explain this more?

@Sathyaj27
Copy link
Contributor

Changes looks good.

@shashidhar-patil
Copy link
Contributor Author

Can you explain this more?

Hi @lucasgonze, this is a fix for issue: #15260

From pcap comparison between the working pcap and magma pcap, we observed that security indication IE is missing, which can be a probable cause for the issue.

Side note: Service request flow is successful when tested with UERANSIM.

Signed-off-by: shashidhar-patil <shashidhar.patil@wavelabs.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: agw Access gateway-related issue size/S Denotes a PR that changes 10-29 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants