tidb
tidb copied to clipboard
*: [security] neutralizes externally-controlled format DSN strings
What problem does this PR solve?
Issue Number: close 120f1346-e958-49d0-b66c-0f889a469540 (external)
Problem Summary:
TiDB uses Go MySQL Driver for connecting to MySQL servers. The Data Source Name (DSN) strings for describing database connections is not neutralized so they can escape and add new parameters to use as data source name.
What is changed and how it works?
- Escape any untrusted input to connect by DSN strings.
Check List
Tests
- [ ] Unit test
- [ ] Integration test
- [x] Manual test (add detailed scripts or steps below)
- [ ] No code
Side effects
- [ ] Performance regression: Consumes more CPU
- [ ] Performance regression: Consumes more Memory
- [ ] Breaking backward compatibility
Documentation
- [ ] Affects user behaviors
- [ ] Contains syntax changes
- [ ] Contains variable changes
- [ ] Contains experimental features
- [ ] Changes MySQL compatibility
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.
Fix the issue of arbitrary file read via data source name injection (CVE-2022-3023).
[REVIEW NOTIFICATION]
This pull request has not been approved.
To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer
in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer
in the comment to help you merge this pull request.
The full list of commands accepted by this bot can be found here.
Reviewer can indicate their review by submitting an approval review. Reviewer can cancel approval by submitting a request changes review.
Welcome @dwisiswant0!
It looks like this is your first PR to pingcap/tidb 🎉.
I'm the bot to help you request reviewers, add labels and more, See available commands.
We want to make sure your contribution gets all the attention it needs!
Thank you, and welcome to pingcap/tidb. :smiley:
Code Coverage Details: https://codecov.io/github/pingcap/tidb/commit/c5f296b775fb7f01364b7e67591cb02de4ea5234
/run-br-integration-tests
/run-integration-br-tests
@dwisiswant0: PR needs rebase.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
ping @dwisiswant0 , do you need some help?
ping @dwisiswant0 , do you need some help?
Since I didn't think about the complexity at first, I'm going to close this PR unfortunately.
ping @dwisiswant0 , do you need some help?
Since I didn't think about the complexity at first, I'm going to close this PR unfortunately.
We can fix it in our daily work. Can you verify that my comments in https://github.com/pingcap/tidb/pull/37489#discussion_r967035685 is safe enough?
ping @dwisiswant0 , do you need some help?
Since I didn't think about the complexity at first, I'm going to close this PR unfortunately.
We can fix it in our daily work. Can you verify that my comments in #37489 (comment) is safe enough?
In the context of verifying the patch, I'd prefer to test it directly for more flexibility from my side (something related e.g. bypass, etc). So feel free to ping me (in the future associated PR or 120f1346-e958-49d0-b66c-0f889a469540) whenever it's in a ready for review state. :)