Commit 9b493ab
ksmbd: fix null pointer dereference error in generate_encryptionkey
If client send two session setups with krb5 authenticate to ksmbd,
null pointer dereference error in generate_encryptionkey could happen.
sess->Preauth_HashValue is set to NULL if session is valid.
So this patch skip generate encryption key if session is valid.
Cc: stable@vger.kernel.org
Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-27654
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>1 parent 4e45cca commit 9b493ab
1 file changed
Lines changed: 16 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1621 | 1621 | | |
1622 | 1622 | | |
1623 | 1623 | | |
1624 | | - | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
| 1634 | + | |
| 1635 | + | |
| 1636 | + | |
1625 | 1637 | | |
1626 | 1638 | | |
1627 | 1639 | | |
1628 | | - | |
| 1640 | + | |
| 1641 | + | |
1629 | 1642 | | |
1630 | 1643 | | |
1631 | 1644 | | |
| |||
1638 | 1651 | | |
1639 | 1652 | | |
1640 | 1653 | | |
| 1654 | + | |
1641 | 1655 | | |
1642 | 1656 | | |
1643 | 1657 | | |
| |||
0 commit comments