[Home]

Summary:ASTERISK-30213: Make crypto_load() reentrant and handle symlinks correctly
Reporter:Philip Prindeville (pprindeville)Labels:
Date Opened:2022-09-07 14:41:58Date Closed:2022-10-10 10:09:26
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Resources/res_crypto
Versions:16.28.0 18.14.0 19.6.0 20.0.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Attachments:
Description:Currently readdir() is called in crypto_load() directly, rather than with the locking protection of ast_file_read_dirs().

Also, when a symlink is discovered, we should check the ownership of its parent directories for being owned by the running uid or by root.  Lastly, the key file itself should not have other read/write permissions set.
Comments:By: Asterisk Team (asteriskteam) 2022-09-07 14:42:03.143-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution. Please note that log messages and other files should not be sent to the Sangoma Asterisk Team unless explicitly asked for. All files should be placed on this issue in a sanitized fashion as needed.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

Please note that by submitting data, code, or documentation to Sangoma through JIRA, you accept the Terms of Use present at [https://www.asterisk.org/terms-of-use/|https://www.asterisk.org/terms-of-use/].

By: Friendly Automation (friendly-automation) 2022-10-10 10:09:27.815-0500

Change 19394 merged by George Joseph:
res_crypto: use ast_file_read_dirs() to iterate

[https://gerrit.asterisk.org/c/asterisk/+/19394|https://gerrit.asterisk.org/c/asterisk/+/19394]

By: Friendly Automation (friendly-automation) 2022-10-10 10:10:08.449-0500

Change 19395 merged by George Joseph:
res_crypto: use ast_file_read_dirs() to iterate

[https://gerrit.asterisk.org/c/asterisk/+/19395|https://gerrit.asterisk.org/c/asterisk/+/19395]

By: Friendly Automation (friendly-automation) 2022-10-10 10:10:51.636-0500

Change 19396 merged by George Joseph:
res_crypto: use ast_file_read_dirs() to iterate

[https://gerrit.asterisk.org/c/asterisk/+/19396|https://gerrit.asterisk.org/c/asterisk/+/19396]

By: Friendly Automation (friendly-automation) 2022-10-10 10:11:17.800-0500

Change 19397 merged by George Joseph:
res_crypto: use ast_file_read_dirs() to iterate

[https://gerrit.asterisk.org/c/asterisk/+/19397|https://gerrit.asterisk.org/c/asterisk/+/19397]

By: Friendly Automation (friendly-automation) 2022-10-10 10:11:52.194-0500

Change 19277 merged by George Joseph:
res_crypto: use ast_file_read_dirs() to iterate

[https://gerrit.asterisk.org/c/asterisk/+/19277|https://gerrit.asterisk.org/c/asterisk/+/19277]

By: Friendly Automation (friendly-automation) 2022-10-10 10:12:38.027-0500

Change 19279 merged by George Joseph:
res_crypto: don't modify fname in try_load_key()

[https://gerrit.asterisk.org/c/asterisk/+/19279|https://gerrit.asterisk.org/c/asterisk/+/19279]

By: Friendly Automation (friendly-automation) 2022-10-10 10:12:52.920-0500

Change 19398 merged by George Joseph:
res_crypto: don't modify fname in try_load_key()

[https://gerrit.asterisk.org/c/asterisk/+/19398|https://gerrit.asterisk.org/c/asterisk/+/19398]

By: Friendly Automation (friendly-automation) 2022-10-10 10:13:04.448-0500

Change 19399 merged by George Joseph:
res_crypto: don't modify fname in try_load_key()

[https://gerrit.asterisk.org/c/asterisk/+/19399|https://gerrit.asterisk.org/c/asterisk/+/19399]

By: Friendly Automation (friendly-automation) 2022-10-10 10:13:31.902-0500

Change 19420 merged by George Joseph:
res_crypto: don't modify fname in try_load_key()

[https://gerrit.asterisk.org/c/asterisk/+/19420|https://gerrit.asterisk.org/c/asterisk/+/19420]

By: Friendly Automation (friendly-automation) 2022-10-10 10:13:46.195-0500

Change 19421 merged by George Joseph:
res_crypto: don't modify fname in try_load_key()

[https://gerrit.asterisk.org/c/asterisk/+/19421|https://gerrit.asterisk.org/c/asterisk/+/19421]

By: Friendly Automation (friendly-automation) 2022-10-14 10:01:03.367-0500

Change 19407 merged by Friendly Automation:
res_crypto: handle unsafe private key files

[https://gerrit.asterisk.org/c/asterisk/+/19407|https://gerrit.asterisk.org/c/asterisk/+/19407]

By: Friendly Automation (friendly-automation) 2022-10-14 10:01:09.579-0500

Change 19408 merged by Friendly Automation:
res_crypto: handle unsafe private key files

[https://gerrit.asterisk.org/c/asterisk/+/19408|https://gerrit.asterisk.org/c/asterisk/+/19408]

By: Friendly Automation (friendly-automation) 2022-10-14 10:02:00.894-0500

Change 19405 merged by Friendly Automation:
res_crypto: handle unsafe private key files

[https://gerrit.asterisk.org/c/asterisk/+/19405|https://gerrit.asterisk.org/c/asterisk/+/19405]

By: Friendly Automation (friendly-automation) 2022-10-14 10:28:52.085-0500

Change 19278 merged by George Joseph:
res_crypto: handle unsafe private key files

[https://gerrit.asterisk.org/c/asterisk/+/19278|https://gerrit.asterisk.org/c/asterisk/+/19278]

By: Friendly Automation (friendly-automation) 2022-10-14 10:29:28.129-0500

Change 19406 merged by George Joseph:
res_crypto: handle unsafe private key files

[https://gerrit.asterisk.org/c/asterisk/+/19406|https://gerrit.asterisk.org/c/asterisk/+/19406]