【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

 

相关文章
|
Java 开发工具
【Azure Storage Account】Java Code访问Storage Account File Share的上传和下载代码示例
本文介绍如何使用Java通过azure-storage-file-share SDK实现Azure文件共享的上传下载。包含依赖引入、客户端创建及完整示例代码,助你快速集成Azure File Share功能。
873 6
|
Java API 开发工具
【Azure Developer】Java代码实现获取Azure 资源的指标数据却报错 "invalid time interval input"
在使用 Java 调用虚拟机 API 获取指标数据时,因本地时区设置非 UTC,导致时间格式解析错误。解决方法是在代码中手动指定时区为 UTC,使用 `ZoneOffset.ofHours(0)` 并结合 `withOffsetSameInstant` 方法进行时区转换,从而避免因时区差异引发的时间格式问题。
541 4
|
API C++
【Azure 环境】VS Code登录China Azure(Function)报错 An error occurred while signing in: invalid_request - AADSTS65002
An error occurred while signing in: invalid_request - AADSTS65002: Consent between first party application 'c27c220f-ce2f-4904-927d-333864217eeb' and first party resource '797f4846-ba00-4fd7-ba43-dac1f8f63013' must be configured via preauthorization - applications owned and operated by Microsoft mus
657 13
|
存储 安全 数据安全/隐私保护
【Azure Function App】在Function App中使用System Managed Identity访问Storage Account
本文介绍了如何在Azure Function中使用托管身份(Managed Identity)替代AzureWebJobsStorage连接函数应用到存储账户,以提高安全性并减少Access Key的使用。具体步骤包括:1) 启用系统分配的身份;2) 为函数应用授予存储访问权限,添加必要角色(如Storage Blob Data Contributor);3) 配置`AzureWebJobsStorage__blobServiceUri`参数指定Blob Service Uri。完成后删除旧配置,即可通过Managed Identity访问Storage Account。
553 20
|
数据安全/隐私保护
【Azure Function App】PowerShell Function 执行 Get-AzAccessToken 的返回值类型问题:System.String 与 System.Security.SecureString
将PowerShell Function部署到Azure Function App后,Get-AzAccessToken返回值类型在不同环境中有差异。正常为SecureString类型,但部分情况下为System.String类型,导致后续处理出错。解决方法是在profile.ps1中设置环境变量$env:AZUREPS_OUTPUT_PLAINTEXT_AZACCESSTOKEN=false,以禁用明文输出。
397 1
|
JSON 数据格式
【Azure 环境】当一个Azure Function资源创建很久了,是否可以获取到它的创建时间呢?
用户在尝试获取 Azure Function App 的创建时间时发现,资源 JSON 中缺少 `createdTime` 字段,仅能查看到 `lastModifiedTime`。同时,活动日志和 Azure Resource Graph 查询也未能提供创建时间信息。经解答,Azure 并未为所有资源类型记录创建时间,建议在部署时将创建时间作为标签记录。若创建时间在 90 天内,可通过部署日志间接获取。
421 7
|
JSON C# 数据格式
【Azure Function】C#独立工作模式下参数类型 ServiceBusReceivedMessage 无法正常工作
Cannot convert input parameter 'message' to type 'Azure.Messaging.ServiceBus.ServiceBusReceivedMessage' from type 'System.String'.
456 73
|
Java Shell Maven
【Azure Container App】构建Java应用镜像时候遇无法编译错误:ERROR [build 10/10] RUN ./mvnw.cmd dependency:go-offline -B -Dproduction package
在部署Java应用到Azure Container App时,构建镜像过程中出现错误:“./mvnw.cmd: No such file or directory”。尽管项目根目录包含mvnw和mvnw.cmd文件,但依然报错。问题出现在Dockerfile构建阶段执行`./mvnw dependency:go-offline`命令时,系统提示找不到可执行文件。经过排查,确认是mvnw文件内容异常所致。最终通过重新生成mvnw文件解决该问题,镜像成功构建。
868 1
【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
496 64

热门文章

最新文章