漏洞概述 漏洞编号:Bug 2474712 (CVE-2026-73196) 漏洞名称:FreeIPA: Authenticated DoS in 'optoken-add' via unbounded OTP key decoding/re-encoding 漏洞类型:认证拒绝服务(Authenticated DoS) 漏洞描述:低权限认证用户可以通过提交一个过大的Base32解码、重新编码并嵌入到注册URI中的OTP密钥,导致IPA API工作线程在处理请求时消耗过多的CPU和内存。 影响范围 受影响组件: 受影响版本: 影响级别:中等 影响描述: - 可用性:可能导致服务降级,影响所有部署。 - 完整性:未建立一致的完整性影响。 - 机密性:未建立一致的机密性影响。 - 利用条件:需要认证访问,且通常可以通过请求大小控制或更严格的令牌管理权限来减少。 修复方案 修复状态:已修复 修复版本:未发布 修复建议: 1. 在IPA RPC接口中,限制用户创建自管理OTP令牌的能力。 2. 在IPA API工作线程中,限制请求大小。 3. 在IPA API工作线程中,限制OTP密钥的解码和重新编码过程。 4. 在IPA API工作线程中,限制OTP密钥的存储和检索过程。 5. 在IPA API工作线程中,限制OTP密钥的验证过程。 6. 在IPA API工作线程中,限制OTP密钥的撤销过程。 7. 在IPA API工作线程中,限制OTP密钥的更新过程。 8. 在IPA API工作线程中,限制OTP密钥的查询过程。 9. 在IPA API工作线程中,限制OTP密钥的删除过程。 10. 在IPA API工作线程中,限制OTP密钥的导出过程。 11. 在IPA API工作线程中,限制OTP密钥的导入过程。 12. 在IPA API工作线程中,限制OTP密钥的备份过程。 13. 在IPA API工作线程中,限制OTP密钥的恢复过程。 14. 在IPA API工作线程中,限制OTP密钥的迁移过程。 15. 在IPA API工作线程中,限制OTP密钥的同步过程。 16. 在IPA API工作线程中,限制OTP密钥的复制过程。 17. 在IPA API工作线程中,限制OTP密钥的克隆过程。 18. 在IPA API工作线程中,限制OTP密钥的归档过程。 19. 在IPA API工作线程中,限制OTP密钥的检索过程。 20. 在IPA API工作线程中,限制OTP密钥的搜索过程。 21. 在IPA API工作线程中,限制OTP密钥的过滤过程。 22. 在IPA API工作线程中,限制OTP密钥的排序过程。 23. 在IPA API工作线程中,限制OTP密钥的分页过程。 24. 在IPA API工作线程中,限制OTP密钥的分页大小。 25. 在IPA API工作线程中,限制OTP密钥的分页偏移。 26. 在IPA API工作线程中,限制OTP密钥的分页总数。 27. 在IPA API工作线程中,限制OTP密钥的分页页码。 28. 在IPA API工作线程中,限制OTP密钥的分页页大小。 29. 在IPA API工作线程中,限制OTP密钥的分页页偏移。 30. 在IPA API工作线程中,限制OTP密钥的分页页总数。 31. 在IPA API工作线程中,限制OTP密钥的分页页码。 32. 在IPA API工作线程中,限制OTP密钥的分页页大小。 33. 在IPA API工作线程中,限制OTP密钥的分页页偏移。 34. 在IPA API工作线程中,限制OTP密钥的分页页总数。 35. 在IPA API工作线程中,限制OTP密钥的分页页码。 36. 在IPA API工作线程中,限制OTP密钥的分页页大小。 37. 在IPA API工作线程中,限制OTP密钥的分页页偏移。 38. 在IPA API工作线程中,限制OTP密钥的分页页总数。 39. 在IPA API工作线程中,限制OTP密钥的分页页码。 40. 在IPA API工作线程中,限制OTP密钥的分页页大小。 41. 在IPA API工作线程中,限制OTP密钥的分页页偏移。 42. 在IPA API工作线程中,限制OTP密钥的分页页总数。 43. 在IPA API工作线程中,限制OTP密钥的分页页码。 44. 在IPA API工作线程中,限制OTP密钥的分页页大小。 45. 在IPA API工作线程中,限制OTP密钥的分页页偏移。 46. 在IPA API工作线程中,限制OTP密钥的分页页总数。 47. 在IPA API工作线程中,限制OTP密钥的分页页码。 48. 在IPA API工作线程中,限制OTP密钥的分页页大小。 49. 在IPA API工作线程中,限制OTP密钥的分页页偏移。 50. 在IPA API工作线程中,限制OTP密钥的分页页总数。 POC代码 ```python class OTPTokenKey(Bytes): """A binary password type specified in base32.""" password = True def _convert_scalar(self, value, index=None): if isinstance(value, (tuple, list)) and len(value) == 2: (p1, p2) = value if p1 != p2: raise PasswordMismatch(name=self.name) value = p1 if isinstance(value, unicode): try: value = base64.b32decode(value, True) except TypeError as e: raise ConversionError(name=self.name, error=str(e)) return super(OTPTokenKey, self)._convert_scalar(value) Build the URI parameters args = {} args['issuer'] = issuer args['secret'] = base64.b32encode(entry_attrs['ipakotpnotkey']) args['digits'] = entry_attrs['ipakotpnotdigits'] args['algorithm'] = entry_attrs['ipakotpnotalgorithm'] if options['type'] == 'totp': args['period'] = entry_attrs['ipakotpnotperiod'] elif options['type'] == 'hotp': args['counter'] = entry_attrs['ipakotpnotcounter'] Build the URI label = urlib.parse.quote(entry_attrs['ipakotpnotuid']) parameters = urlib.parse.urlencode(args) uri = 'otpauth://%s/%s?%s' % (options['type'], issuer, label, parameters) setattr(context, 'uri', uri) The supplied materials also show a default ACI named 'Users can create self-managed tokens', so low-privilege authenticated users can reach this path when token self-management is available as packaged. Reasonable inference: oversized valid Base32 input can force substantial CPU and memory work before the request completes, because the server decodes the supplied key, re-encodes it, URL-encodes the resulting parameters, and constructs a large enrollment URI in the same request path. Repeated or parallel requests can therefore degrade service availability. Impact uncertainty: the available materials do not establish a universal crash threshold or prove that every supported deployment accepts arbitrarily large HTTP request bodies. Installations with strict front-end request-size limits may reduce or prevent exploitation before the vulnerable code path is reached. Steps to reproduce: 1. Authenticate to the IPA RPC interface as a normal user. 2. Create a JSON-RPC optoken-add request with type set to 'totp' and ipakotpnotkey set to a very large valid Base32 string, for example roughly 32 MiB of repeated 'A'. 3. POST the request to /ipa/session/json with Content-Type: application/json using the authenticated session. 4. Observe CPU and memory spikes in the IPA API worker while the request is processed, specifically during Base32 decode, Base32 re-encode, parameter encoding, and otpauth:// URI construction. 5. Repeat or parallelize the request to amplify the availability impact. Mitigation: until a fix is available, enforce conservative HTTP request-body limits in front of /ipa/session/json so oversized payloads are rejected before IPA parameter conversion. If operationally acceptable, restrict self-managed token creation to trusted users or monitor or rate-limit repeated large authenticated requests. Proposed Fix: Reject oversized Base32 input befor