Skip to content

Cellular: clean sensitive information from trace #9660

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

Merged
merged 1 commit into from
Feb 15, 2019

Conversation

blind-owl
Copy link
Contributor

@blind-owl blind-owl commented Feb 11, 2019

Description

Remove sensitive information from cellular subsystem trace logs.

  • SIM pin
  • APN username and password
    Test coverage:
  • unit tests. All pass
  • MTB_ADV_WISE_1570 ontarget gt tests, no regression.

Pull request type

[x ] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

@jarvte

@ciarmcom ciarmcom requested review from jarvte and a team February 11, 2019 14:00
@ciarmcom
Copy link
Member

@blind-owl, thank you for your changes.
@jarvte @ARMmbed/mbed-os-wan @ARMmbed/mbed-os-maintainers please review.

@ciarmcom
Copy link
Member

@blind-owl, thank you for your changes.
@jarvte @ARMmbed/mbed-os-wan @ARMmbed/mbed-os-maintainers please review.

@ciarmcom ciarmcom requested a review from a team February 11, 2019 18:00

const bool stored_debug_state = _at->get_debug();
_at->set_debug(false);

_at->write_string(sim_pin);
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason that this line wasn't instead removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure what you are referring here as injected code:

  1. stores current tracing state (enable/disable)
  2. disable tracing
  3. resumes stored tracing state after sim pin has been written to the modem (cellular subsystem)

@ciarmcom ciarmcom requested a review from a team February 11, 2019 20:00
@ciarmcom
Copy link
Member

@blind-owl, thank you for your changes.
@jarvte @ARMmbed/mbed-os-wan @ARMmbed/mbed-os-maintainers please review.

@0xc0170
Copy link
Contributor

0xc0170 commented Feb 12, 2019

LGTM but Cellular: clean sensitive information from trace commit should contain details from the description plus also why you are adding get_debug (was only set previously) - would answer my question

Copy link
Contributor

@0xc0170 0xc0170 left a comment

Choose a reason for hiding this comment

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

^^

@0xc0170
Copy link
Contributor

0xc0170 commented Feb 12, 2019

I set it to 5.11.5 but we might just have conflicts with latest refactor so some patches might need manual resolution for 5.11.x or just moving to 5.12.

@cmonr
Copy link
Contributor

cmonr commented Feb 13, 2019

Moving to 5.12.

Confirmed that trying to bring this into a patch would lead to pain for @adbridge 😁

Information removed from the cellular subsystem trace log:
* SIM pin
* APN username and password

Added get_debug() to ATHandler.h to get the current trace state in order
to support suspend/resume of trace output.
@blind-owl blind-owl force-pushed the clean_cellular_trace branch from a454a3d to b6a0892 Compare February 14, 2019 07:23
@0xc0170
Copy link
Contributor

0xc0170 commented Feb 15, 2019

CI started

@mbed-ci
Copy link

mbed-ci commented Feb 15, 2019

Test run: SUCCESS

Summary: 12 of 12 test jobs passed
Build number : 1
Build artifacts

@cmonr cmonr merged commit 7f24897 into ARMmbed:master Feb 15, 2019
@blind-owl blind-owl deleted the clean_cellular_trace branch February 18, 2019 11:22
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.

7 participants