CVE-2023-28432 MinIO信息泄露漏洞版本标记错误

最近收到了安全部门发来的一个关于MinIO漏洞告警

image.png

咋眼一看,这个漏洞很是要命,必须得及时修复啊。

于是乎,开始着手升级工作。

首先,确认我们用的MinIO版本是 2021-03-26T00:00:41Z 

之所以选择这个版本,因为这个版本协议是 Apache License 2.0 ,MinIO最后一个可以免费商用且不需要公布源代码的版本。

这个版本以后的,MinIO改变了授权协议为AGPL V3。

根据报告,该漏洞

确认受影响版本:RELEASE.2019-12-17T23-16-33Z <= MinIO < RELEASE.2023-03-20T20-16-18Z

修复版本:RELEASE.2023-03-20T20-16-18Z

我们目前使用的版本在影响版本中。

由于我们使用的版本过于陈旧,不敢升级大版本。

于是想着自己下载源代码,自己根据报告披露的源代码部分,打补丁修复。

// minio/cmd/bootstrap-peer-server.go

func (b *bootstrapRESTServer) VerifyHandler(w http.ResponseWriter, r *http.Request) {  ctx := newContext(r, w, "VerifyHandler")  cfg := getServerSystemCfg()  logger.LogIf(ctx, json.NewEncoder(w).Encode(&cfg)) }

// minio/cmd/bootstrap-peer-server.go

func getServerSystemCfg() ServerSystemConfig {  envs := env.List("MINIO_")  envValues := make(map[string]string, len(envs))  for _, envK := range envs {    // skip certain environment variables as part    // of the whitelist and could be configured    // differently on each nodes, update skipEnvs()    // map if there are such environment values    if _, ok := skipEnvs[envK]; ok {      continue    }    envValues[envK] = env.Get(envK, "")  }  return ServerSystemConfig{    MinioEndpoints: globalEndpoints,    MinioEnv:       envValues,  } }

可是当我下载了源代码吗,切换到我们使用的版本分支上之后,我发现这个版本上并没有报告上的代码

func (b *bootstrapRESTServer) VerifyHandler(w http.ResponseWriter, r *http.Request) {
    ctx := newContext(r, w, "VerifyHandler")
    cfg := getServerSystemCfg()
    logger.LogIf(ctx, json.NewEncoder(w).Encode(&cfg))
    w.(http.Flusher).Flush()
}
func getServerSystemCfg() ServerSystemConfig {
    return ServerSystemConfig{
       MinioPlatform:  fmt.Sprintf("OS: %s | Arch: %s", runtime.GOOS, runtime.GOARCH),
       MinioEndpoints: globalEndpoints,
    }
}

哎呀,怎么回事?怎么回事?怎么回事?

根据报告,有一个验证工具可以来验证这个漏洞。https://github.com/MzzdToT/CVE-2023-28432

下载验证漏洞代码,执行代码后的结果显示我们使用的版本不受影响。

image.png

现在我开始怀疑报告的版本范围有误了,于是对比MinIO源代码

1.jpg

经过对比代码发现,实际引用该缺陷的版本开始于 RELEASE.2021-08-31T05-46-54Z

现在仍然不能确认我的猜测是否正确,开始去MinIO官方查询该漏洞的公告 

https://github.com/minio/minio/security/advisories/GHSA-6xvq-wj2x-3h3q

image.png

真相大白天下了,MinIO官方给出了正确的受影响版本

Affected versions

RELEASE.2021-08-31T05-46-54Z

Patched versions

RELEASE.2023-03-20T20-16-18Z

我们使用的版本不在受影响版本范围内。

经过此次事件,我搜索了好多文章。

哎,国内这个安全厂商也是你抄袭我 我抄袭你。

这篇文章 

https://cloud.tencent.com/developer/article/2315008 

抄袭  

https://www.h3c.com/cn/d_202304/1830808_30003_0.htm

这篇文章

https://www.h3c.com/cn/d_202304/1830808_30003_0.htm 

又抄袭

 https://github.com/minio/minio/security/advisories/GHSA-6xvq-wj2x-3h3q

结果它还抄错了版本,真是坑爹!


下面我要公布搜索到了的文章链接,都是一群坑货,我要狠狠鞭尸它们

https://stack.chaitin.com/techblog/detail/62


https://mp.weixin.qq.com/s/JgskenAZ6Cpecoe2k2AEjQ


https://blog.nsfocus.net/miniocve-2023-28432/


https://www.freebuf.com/vuls/363647.html


https://cloud.tencent.com/developer/article/2315008


https://www.h3c.com/cn/d_202304/1830808_30003_0.htm


https://zone.huoxian.cn/d/2708-cve-2023-28432-minio/17


https://www.cve.org/CVERecord?id=CVE-2023-28432





评论区