File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# TODO list
22
3- ## Release v0.5.14
4-
5- * If the DictionarySize is larger than the UncompressedSize set it to
6- UncompressedSize
7- * make a Header() (h Header, ok bool) function so the user can implement its own
8- policy
9- * Add documentation to Reader to explain the situation
10- * Add a TODO for the rewrite version
11-
123## Release v0.6
134
1451 . Review encoder and check for lzma improvements under xz.
9182
9283## Log
9384
85+ ## 2025-08-28
86+
87+ Release v0.5.14 addresses the security vulnerability CVE-2025 -58058. If you put
88+ bytes in from of a LZMA stream, the header might not be read correctly and
89+ memory for the dictionary buffer allocated. I have implemented mitigations for
90+ the problem.
91+
9492### 2025-08-20
9593
9694Release v0.5.13 addressed issue #61 regarding handling of multiple WriteClosers
Original file line number Diff line number Diff line change 1+ # Release Notes v0.5.14
2+
3+ This release addresses security vulnerability CVE-2025 -58058. It implements a
4+ number of mitigation for a resource leak problem. It needs to only to be updated
5+ if lzma.NewWriter is used.
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ import (
1919// ReaderConfig stores the parameters for the reader of the classic LZMA
2020// format.
2121type ReaderConfig struct {
22- // Since v0.5.14 this parameter sets an upper limit for a .lzma file's
22+ // Since v0.5.14 this parameter sets an upper limit for a .lzma file's
2323 // dictionary size. This helps to mitigate problems with mangled
2424 // headers.
2525 DictCap int
Original file line number Diff line number Diff line change @@ -377,7 +377,7 @@ func TestZeroPrefixIssue(t *testing.T) {
377377 }
378378 h , ok := l .Header ()
379379 t .Logf ("Header %+v ok %v" , h , ok )
380- actualDictSize := len (l .d .Dict .buf .data )- 1
380+ actualDictSize := len (l .d .Dict .buf .data ) - 1
381381 t .Logf ("Actual dictionary size: %d" , actualDictSize )
382382 if actualDictSize > MinDictCap && h .Size >= 0 &&
383383 h .Size < int64 (actualDictSize ) {
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import (
1313// MinDictCap and MaxDictCap provide the range of supported dictionary
1414// capacities.
1515const (
16- MinDictCap = 1 << 12
16+ MinDictCap = 1 << 12
1717 MaxDictCap = 1 << 32 - 1
1818)
1919
You can’t perform that action at this time.
0 commit comments