【Azure Function】Azure Function中使用 Java 8 的安全性问题 - LuBu0505/My-Code GitHub Wiki
问题描述
使用Azure Function, 环境是Linux的Java8。目前 Oracle Java JDK8,11,17 和 OpenJDK 8/11/17 都在存在漏洞受影响版本的范围内。
|
OpenJDK
|
CVE numbers:
CVE‑2023‑21954
CVE‑2023‑21938
CVE‑2023‑21937
CVE‑2023‑21939
CVE‑2023‑21968
CVE‑2023‑21930
CVE‑2023‑21967
|
Description
Multiple vulnerabilities have been reported in OpenJDK,
which can be exploited by malicious people to disclose sensitive information,
manipulate certain data, and cause a DoS (Denial of Service).
The vulnerabilities are reported in 17.0.6 and prior, 11.0.18 and prior, and 8u362 and prior.
| |
Oracle Java SE
|
CVE numbers :
CVE‑2023‑21930
CVE‑2023‑21939
CVE‑2023‑21968
CVE‑2023‑21954
CVE‑2023‑21938
CVE‑2023‑21967
CVE‑2023‑21937
|
Description
Multiple vulnerabilities have been reported in Oracle Java SE,
which can be exploited by malicious people to disclose sensitive information,
manipulate certain data, and cause a DoS (Denial of Service).
- An error within the "JSSE" subcomponent can be exploited to disclose, update, insert, or delete certain data.
- An error within the "JSSE" subcomponent can be exploited to cause a DoS.
- An error within the "Hotspot" subcomponent can be exploited to disclose certain data.
The vulnerability #3 is reported in versions 8u361, 8u361-perf, 11.0.18, and 17.0.6.
- An error within the "Swing" subcomponent can be exploited to update, insert, or delete certain data.
- An error within the "Libraries" subcomponent can be exploited to update, insert, or delete certain data.
- An error within the "Libraries" subcomponent can be exploited to update, insert, or delete certain data.
- An error within the "Networking" subcomponent can be exploited to update, insert, or delete certain data.
|
当前Azure官方文档,目前Function也只支持 Java 8/11/17。详见: https://learn.microsoft.com/zh-cn/azure/azure-functions/functions-reference-java?tabs=bash%2Cconsumption
问题解答
For Linux:
Linux版本的Function APP Java version, Azure团队会根据最新的CVE信息同步升级,已避免潜在威胁。 例如:
Update images to use Java versions 1.8.0_392, 11.0.21, 17.0.9, and 21 :https://github.com/Azure/azure-functions-docker/commit/0f06f6e41fce80f5710fb9eef4d82d602a9aec01
- Java 8: jdk8u392-b08
- Java 11: 11.0.21
- Java 17: 17.0.9
For Windows:
Windows 下的 Java 版本,可以自行引入符合安全规定的JRE版本:https://github.com/Azure/azure-functions-java-worker/wiki/Customize-JRE-used-by-Azure-Functions
对于已存在的Function APP,如果之前没有进行过重启或者定价层的变更,运行的镜像将不会改变,如果需要使用最新版本的SDK,需要将Function APP重启以便拉取最新的镜像。其中运行的Function的代码,则无需改变。
安全更新
主要安全漏洞的补丁和修复程序在 OpenJDK 的 Microsoft 版本中可用后,便会立即发布。 “重大”漏洞是根据 NIST 常见漏洞评分系统版本 2 提供的基本评分 9.0 或以上来定义的。
Tomcat 8.0 生命周期已经在 2018 年 9 月 30 日终止。 尽管该运行时在 Azure 应用服务上仍然可用,但 Azure 不会为 Tomcat 8.0 应用安全更新。 如果可能,请将你的应用程序迁移到 Tomcat 8.5 或 9.0。 Tomcat 8.5 和 9.0 在 Azure 应用服务上都可用。 有关详细信息,请查看 Tomcat 官方网站。
社区对 Java 7 的支持于 2022 年 7 月 29 日结束,Java 7 已从应用服务停用。 如果你的 Web 应用在 Java 7 上运行,请立即升级到 Java 8 或 11。
参考资料
Function App安全更新: https://learn.microsoft.com/zh-cn/azure/app-service/language-support-policy?tabs=windows#security-updates
Customize JRE used by Azure Functions : https://github.com/Azure/azure-functions-java-worker/wiki/Customize-JRE-used-by-Azure-Functions
当在复杂的环境中面临问题,格物之道需:浊而静之徐清,安以动之徐生。 云中,恰是如此!