【Azure Function】Azure Function中使用 Java 8 的安全性问题

简介: 【Azure Function】Azure Function中使用 Java 8 的安全性问题

问题描述

使用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). 

  1. An error within the "JSSE" subcomponent can be exploited to disclose, update, insert, or delete certain data.
  2. An error within the "JSSE" subcomponent can be exploited to cause a DoS.
  3. 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. 

  1. An error within the "Swing" subcomponent can be exploited to update, insert, or delete certain data.
  2. An error within the "Libraries" subcomponent can be exploited to update, insert, or delete certain data.
  3. An error within the "Libraries" subcomponent can be exploited to update, insert, or delete certain data.
  4. 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

 

相关文章
|
17天前
|
C#
【Azure Function】Function App出现System.IO.FileNotFoundException异常
Exception while executing function: xxxxxxx,The type initializer for 'xxxxxx.Storage.Adls2.StoreDataLakeGen2Reading' threw an exception. Could not load file or assembly 'Microsoft.Extensions.Configuration, Version=9.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the
113 64
|
1月前
|
JSON C# 数据格式
【Azure Function】C#独立工作模式下参数类型 ServiceBusReceivedMessage 无法正常工作
Cannot convert input parameter 'message' to type 'Azure.Messaging.ServiceBus.ServiceBusReceivedMessage' from type 'System.String'.
111 73
|
3天前
|
JavaScript API
【Azure Function】Function App门户上的Test/Run返回错误:Failed to fetch
Running your function in portal requires the app to explicitly accept requests from https://portal.azure.cn. This is known as cross-origin resource sharing (CORS).Configure CORS to add https://portal.azure.cn to allowed origins.
|
1月前
|
Java Windows
【Azure Function】部署Java Function失败:报错deploy [ERROR] Status code 401和警告 'China North 3' may not be a valid region
1:deploy [ERROR] Status code 401, (empty body). 2: China North 3 may not be a valid region,please refer to https://aka.ms/maven_function_configuration#supported-regions for values. 3:  <azure.functions.maven.plugin.version>1.36.0</azure.functions.maven.plugin.version>
38 11
|
3月前
|
SQL 安全 Java
安全问题已经成为软件开发中不可忽视的重要议题。对于使用Java语言开发的应用程序来说,安全性更是至关重要
在当今网络环境下,Java应用的安全性至关重要。本文深入探讨了Java安全编程的最佳实践,包括代码审查、输入验证、输出编码、访问控制和加密技术等,帮助开发者构建安全可靠的应用。通过掌握相关技术和工具,开发者可以有效防范安全威胁,确保应用的安全性。
71 4
|
3月前
|
存储 安全 Java
如何保证 Java 类文件的安全性?
Java类文件的安全性可以通过多种方式保障,如使用数字签名验证类文件的完整性和来源,利用安全管理器和安全策略限制类文件的权限,以及通过加密技术保护类文件在传输过程中的安全。
113 4
|
3月前
|
Java Maven Android开发
【Azure Developer】VS Code打包Java maven Project 遇见 BUILD FAILURE
Unknown lifecycle phase "lean". You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>
|
4月前
|
Java 数据处理
|
5月前
|
设计模式 Java
结合HashMap与Java 8的Function和Optional消除ifelse判断
`shigen`是一位致力于记录成长、分享认知和留住感动的博客作者。本文通过具体代码示例探讨了如何优化业务代码中的if-else结构。首先展示了一个典型的if-else处理方法,并指出其弊端;然后引入了策略模式和工厂方法等优化方案,最终利用Java 8的Function和Optional特性简化代码。此外,还提到了其他几种消除if-else的方法,如switch-case、枚举行、SpringBoot的IOC等。一起跟随shigen的脚步,让每一天都有所不同!
60 10
结合HashMap与Java 8的Function和Optional消除ifelse判断

热门文章

最新文章