RSAKeyFormatHelper does not reject nonsense RSAPrivateKey versions
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 84/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- csharp
- Área
- cryptography, security
Línea de trabajo
Comienza con la validación en RSAKeyFormatHelper.Pkcs1.cs, líneas 23-25, e inspecciona la definición firmada de Version en PrivateKeyInfoAsn.xml.cs. Sigue la ruta existente de decodificación de claves privadas RSA, añade cobertura para versiones negativas y verifica que un RSAPrivateKey con cualquier versión negativa sea rechazado en lugar de tratarse como la versión 0.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Description
If an RSAPrivateKey has a version of -1 it decodes successfully and is treated as 0.
Version is a signed integer, so it can contain negative values:
Reproduction Steps
Construct an RSAPrivateKey with a version of -1, or any other negative number.
Expected behavior
The RSAPrivateKey should be rejected.
Actual behavior
The RSAPrivateKey version is treated as 0.
Regression?
No
Known Workarounds
No response
Configuration
No response
Other information
RFC 8017 and RFC 3447 define version as
Version ::= INTEGER { two-prime(0), multi(1) }
(CONSTRAINED BY
{-- version must be multi if otherPrimeInfos present --}
Since .NET does not support multi-prime values for key imports, the version check should probably just be != 0.
- Lenguaje dominante
- C#
- Estrellas
- 18.3k
- Forks
- 5.6k
- Merge medio
- 2 d 20 h
- PR fusionados (30 d)
- 614
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de dotnet/runtime
-
area-System.Memory untriaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
dotnet/runtime#134840 · 4 comentarios · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
area-System.Linq untriaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
dotnet/runtime#134736 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
area-System.Numerics.Tensors untriaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
dotnet/runtime#134691 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
area-System.Threading blocking-clean-ci Known Build Error untriaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
dotnet/runtime#134679 · 4 comentarios ·
Los mantenedores suelen responder en 1 día
-
ARM64: conditional compare rejects negative immediates the emitter can already encode as `ccmn`Abiertoarea-CodeGen-coreclr performance
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
dotnet/runtime#134663 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de dotnet/runtime
Issues similares
-
WPF: each page's `Title` overwrites the window title, and returning to a page does not restore itAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
agentic-workflows area/Docs partner/agentic-workflows
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
jamesmontemagno/tiny-clips#378 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
go 🏃 testing 🧪
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
valkey-io/valkey-glide#7239 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
SubtitleEdit/subtitleedit#15462 ·
Los mantenedores suelen responder en 1 día