目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1336

100%

CWE-404 不恰当的资源关闭或释放 类漏洞列表 395

CWE-404 不恰当的资源关闭或释放 类弱点 395 条 CVE 漏洞汇总,含 AI 中文分析。

CWE-404属于资源管理缺陷,指程序在资源重用前未正确释放或释放不当。攻击者常利用此漏洞耗尽系统资源,导致拒绝服务或引发内存泄漏。开发者需确保在所有执行路径(包括异常和超时)中均正确释放资源,严格管理资源生命周期,防止资源泄露以维持系统稳定性。

MITRE CWE 官方描述
CWE:CWE-404 不正确的资源关闭或释放 (Improper Resource Shutdown or Release) 英文:产品在资源被重新使用前未释放或不正确地释放了资源。 当资源被创建或分配时,开发人员有责任正确释放该资源,并考虑到所有潜在的过期或失效路径,例如设定的时间段或撤销。
常见影响 (2)
Availability, Other DoS: Resource Consumption (Other), Varies by Context
Most unreleased resource issues result in general software reliability problems, but if an attacker can intentionally trigger a resource leak, the attacker might be able to launch a denial of service attack by depleting the resource pool.
Confidentiality Read Application Data
When a resource containing sensitive information is not correctly shutdown, it may expose the sensitive data in a subsequent allocation.
缓解措施 (4)
Requirements Use a language that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. For example, languages such as Java, Ruby, and Lisp perform automatic garbage collection that releases memory for objects that have been deallocated.
Implementation It is good practice to be responsible for freeing all resources you allocate and to be consistent with how and where you free memory in a function. If you allocate memory that you intend to free upon completion of the function, you must be sure to free the memory at all exit points for that function including error conditions.
Implementation Memory should be allocated/freed using matching functions such as malloc/free, new/delete, and new[]/delete[].
Implementation When releasing a complex object or structure, ensure that you properly dispose of all of its member components, not just the object itself.
代码示例 (2)
The following method never closes the new file handle. Given enough time, the Finalize() method for BufferReader should eventually call Close(), but there is no guarantee as to how long this action will take. In fact, there is no guarantee that Finalize() will ever be invoked. In a busy environment, the Operating System could use up all of the available file handles before the Close() function is …
private void processFile(string fName) { BufferReader fil = new BufferReader(new FileReader(fName)); String line; while ((line = fil.ReadLine()) != null) { processLine(line); } }
Bad · Java
private void processFile(string fName) { BufferReader fil = new BufferReader(new FileReader(fName)); String line; while ((line = fil.ReadLine()) != null) { processLine(line); } fil.Close(); }
Good · Java
This code attempts to open a connection to a database and catches any exceptions that may occur.
try { Connection con = DriverManager.getConnection(some_connection_string); } catch ( Exception e ) { log( e ); }
Bad · Java
CVE ID 标题 CVSS 风险等级 Published
CVE-2023-0909 notepad-- 安全漏洞 — notepad-- 3.3 Low 2023-02-18
CVE-2023-0908 Xoslab Easy File Locker 安全漏洞 — Easy File Locker 5.5 Medium 2023-02-18
CVE-2023-0907 Filseclab Twister Antivirus 安全漏洞 — Twister Antivirus 4.4 Medium 2023-02-18
CVE-2023-0850 NETGEAR WNDR3700 安全漏洞 — WNDR3700v2 2.7 Low 2023-02-15
CVE-2023-0848 NETGEAR WNDR3700 安全漏洞 — WNDR3700v2 5.3 Medium 2023-02-15
CVE-2014-125066 yuko-bot 安全漏洞 — yuko-bot 4.3 Medium 2023-01-08
CVE-2015-10025 miniConf 安全漏洞 — miniConf 3.5 Low 2023-01-07
CVE-2023-0029 Multilaser Router AC1200 安全漏洞 — RE708 5.3 Medium 2023-01-01
CVE-2018-25062 ElementalX-N9 安全漏洞 — ElementalX 3.5 Low 2023-01-01
CVE-2017-20154 Phoenixcoin 安全漏洞 — Phoenixcoin 3.5 Low 2022-12-30
CVE-2021-4280 Praat Script Collection 安全漏洞 — styler_praat_scripts 4.3 Medium 2022-12-25
CVE-2022-33324 Mitsubishi Electric MELSEC iQ-R、iQ-L Series 安全漏洞 — MELSEC iQ-R Series R00CPU 7.5 High 2022-12-23
CVE-2021-4247 OWASP NodeGoat 安全漏洞 — NodeGoat 4.3 Medium 2022-12-18
CVE-2021-4249 snoyberg xml 安全漏洞 — xml-conduit 4.3 Medium 2022-12-18
CVE-2021-4250 ActiveAttr 安全漏洞 — active_attr 3.5 Low 2022-12-18
CVE-2022-4565 Dromara HuTool 资源管理错误漏洞 — HuTool 4.3 Medium 2022-12-16
CVE-2022-4296 TP-LINK TL-WR740N 资源管理错误漏洞 — TL-WR740N 6.5 Medium 2022-12-06
CVE-2022-4246 Kakao PotPlayer 安全漏洞 — PotPlayer 4.3 Medium 2022-12-01
CVE-2022-4066 Onion 安全漏洞 — onion 3.5 Low 2022-11-19
CVE-2022-3957 GPAC 安全漏洞 — GPAC 4.3 Medium 2022-11-11
CVE-2022-39368 Eclipse Californium 安全漏洞 — californium 8.2 High 2022-11-09
CVE-2022-3807 Bento4 资源管理错误漏洞 — Bento4 4.3 Medium 2022-11-01
CVE-2022-3809 Bento4 安全漏洞 — Bento4 4.3 Medium 2022-11-01
CVE-2022-3810 Bento4 安全漏洞 — Bento4 4.3 Medium 2022-11-01
CVE-2022-3812 Bento4 安全漏洞 — Bento4 4.3 Medium 2022-11-01
CVE-2022-3813 Bento4 安全漏洞 — Bento4 4.3 Medium 2022-11-01
CVE-2022-3814 Bento4 安全漏洞 — Bento4 4.3 Medium 2022-11-01
CVE-2022-3815 Bento4 安全漏洞 — Bento4 4.3 Medium 2022-11-01
CVE-2022-3816 Bento4 安全漏洞 — Bento4 4.3 Medium 2022-11-01
CVE-2022-3817 Bento4 安全漏洞 — Bento4 4.3 Medium 2022-11-01

CWE-404(不恰当的资源关闭或释放) 是常见的弱点类别,本平台收录该类弱点关联的 395 条 CVE 漏洞。