<feed xmlns='http://www.w3.org/2005/Atom'>
<title>go, branch go1.13.13</title>
<subtitle>Fork of Go programming language with my patches.</subtitle>
<id>http://git.kilabit.info/go/atom?h=go1.13.13</id>
<link rel='self' href='http://git.kilabit.info/go/atom?h=go1.13.13'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/'/>
<updated>2020-07-14T14:10:10Z</updated>
<entry>
<title>[release-branch.go1.13-security] go1.13.13</title>
<updated>2020-07-14T14:10:10Z</updated>
<author>
<name>Andrew Bonventre</name>
<email>andybons@golang.org</email>
</author>
<published>2020-07-14T13:15:35Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=1f8859c22ccdeb969b252c8139bf4b1aae5c4909'/>
<id>urn:sha1:1f8859c22ccdeb969b252c8139bf4b1aae5c4909</id>
<content type='text'>
Change-Id: I65f5d9cc1363d369ced4496c1d6d3d7f9144f1b8
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/794127
Reviewed-by: Katie Hockman &lt;katiehockman@google.com&gt;
</content>
</entry>
<entry>
<title>[release-branch.go1.13-security] crypto/x509: respect VerifyOptions.KeyUsages on Windows</title>
<updated>2020-07-14T12:23:08Z</updated>
<author>
<name>Filippo Valsorda</name>
<email>filippo@golang.org</email>
</author>
<published>2020-06-19T02:45:52Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=4a4c8d3d971fa77e4346d2874220ff736047f13c'/>
<id>urn:sha1:4a4c8d3d971fa77e4346d2874220ff736047f13c</id>
<content type='text'>
When using the platform verifier on Windows (because Roots is nil) we
were always enforcing server auth EKUs if DNSName was set, and none
otherwise. If an application was setting KeyUsages, they were not being
respected.

Started correctly surfacing IncompatibleUsage errors from the system
verifier, as those are the ones applications will see if they are
affected by this change.

Also refactored verify_test.go to make it easier to add tests for this,
and replaced the EKULeaf chain with a new one that doesn't have a SHA-1
signature.

Thanks to Niall Newman for reporting this.

Fixes #39360
Fixes CVE-2020-14039

Change-Id: If5c00d615f2944f7d57007891aae1307f9571c32
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/774414
Reviewed-by: Katie Hockman &lt;katiehockman@google.com&gt;
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/793509
Reviewed-by: Filippo Valsorda &lt;valsorda@google.com&gt;
</content>
</entry>
<entry>
<title>[release-branch.go1.13-security] net/http: synchronize "100 Continue" write and Handler writes</title>
<updated>2020-07-13T20:57:52Z</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2020-07-13T17:27:22Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=e434185ec16b3783629bcb364b9a350706df7c1e'/>
<id>urn:sha1:e434185ec16b3783629bcb364b9a350706df7c1e</id>
<content type='text'>
The expectContinueReader writes to the connection on the first
Request.Body read. Since a Handler might be doing a read in parallel or
before a write, expectContinueReader needs to synchronize with the
ResponseWriter, and abort if a response already went out.

The tests will land in a separate CL.

Fixes #34902
Fixes CVE-2020-15586

Change-Id: Icdd8dd539f45e8863762bd378194bb4741e875fc
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/793350
Reviewed-by: Filippo Valsorda &lt;valsorda@google.com&gt;
(cherry picked from commit b5e504f4a07c572744b228fa1b10e3989c4c44f3)
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/793499
</content>
</entry>
<entry>
<title>[release-branch.go1.13] go1.13.12</title>
<updated>2020-06-01T19:34:58Z</updated>
<author>
<name>Dmitri Shuralyov</name>
<email>dmitshur@golang.org</email>
</author>
<published>2020-06-01T17:15:51Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=6be4a5eb4898c7b5e7557dda061cc09ba310698b'/>
<id>urn:sha1:6be4a5eb4898c7b5e7557dda061cc09ba310698b</id>
<content type='text'>
Change-Id: I1989d7cab0bf75c4e42d1c48146be9131d2c105c
Reviewed-on: https://go-review.googlesource.com/c/go/+/235918
Run-TryBot: Dmitri Shuralyov &lt;dmitshur@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Andrew Bonventre &lt;andybons@golang.org&gt;
</content>
</entry>
<entry>
<title>[release-branch.go1.13] math/big: make Rat.Denom side-effect free</title>
<updated>2020-05-27T22:53:26Z</updated>
<author>
<name>Robert Griesemer</name>
<email>gri@golang.org</email>
</author>
<published>2019-10-23T23:44:51Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=90fe4a73fff10394097e21085a9c0c369c61b09a'/>
<id>urn:sha1:90fe4a73fff10394097e21085a9c0c369c61b09a</id>
<content type='text'>
A Rat is represented via a quotient a/b where a and b are Int values.
To make it possible to use an uninitialized Rat value (with a and b
uninitialized and thus == 0), the implementation treats a 0 denominator
as 1.

Rat.Num and Rat.Denom return pointers to these values a and b. Because
b may be 0, Rat.Denom used to first initialize it to 1 and thus produce
an undesirable side-effect (by changing the Rat's denominator).

This CL changes Denom to return a new (not shared) *Int with value 1
in the rare case where the Rat was not initialized. This eliminates
the side effect and returns the correct denominator value.

While this is changing behavior of the API, the impact should now be
minor because together with (prior) CL https://golang.org/cl/202997,
which initializes Rats ASAP, Denom is unlikely used to access the
denominator of an uninitialized (and thus 0) Rat. Any operation that
will somehow set a Rat value will ensure that the denominator is not 0.

Fixes #36689.
For #33792.
For #3521.

Change-Id: I0bf15ac60513cf52162bfb62440817ba36f0c3fc
Reviewed-on: https://go-review.googlesource.com/c/go/+/203059
Run-TryBot: Robert Griesemer &lt;gri@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
Reviewed-on: https://go-review.googlesource.com/c/go/+/233323
Reviewed-by: Emmanuel Odeke &lt;emm.odeke@gmail.com&gt;
Run-TryBot: Dmitri Shuralyov &lt;dmitshur@golang.org&gt;
</content>
</entry>
<entry>
<title>[release-branch.go1.13] math/big: normalize unitialized denominators ASAP</title>
<updated>2020-05-27T22:52:28Z</updated>
<author>
<name>Robert Griesemer</name>
<email>gri@golang.org</email>
</author>
<published>2019-10-23T21:22:32Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=7f1ef49347e6e1f5a51c9ca3e4f4f617c2317042'/>
<id>urn:sha1:7f1ef49347e6e1f5a51c9ca3e4f4f617c2317042</id>
<content type='text'>
A Rat is represented via a quotient a/b where a and b are Int values.
To make it possible to use an uninitialized Rat value (with a and b
uninitialized and thus == 0), the implementation treats a 0 denominator
as 1.

For each operation we check if the denominator is 0, and then treat
it as 1 (if necessary). Operations that create a new Rat result,
normalize that value such that a result denominator 1 is represened
as 0 again.

This CL changes this behavior slightly: 0 denominators are still
interpreted as 1, but whenever we (safely) can, we set an uninitialized
0 denominator to 1. This simplifies the code overall.

Also: Improved some doc strings.

Preparation for addressing issue #33792.

For #36689.
For #33792.

Change-Id: I3040587c8d0dad2e840022f96ca027d8470878a0
Reviewed-on: https://go-review.googlesource.com/c/go/+/202997
Run-TryBot: Robert Griesemer &lt;gri@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
Reviewed-on: https://go-review.googlesource.com/c/go/+/233322
Run-TryBot: Dmitri Shuralyov &lt;dmitshur@golang.org&gt;
Reviewed-by: Emmanuel Odeke &lt;emm.odeke@gmail.com&gt;
</content>
</entry>
<entry>
<title>[release-branch.go1.13] math/big: make Rat accessors safe for concurrent use</title>
<updated>2020-05-27T22:52:06Z</updated>
<author>
<name>Robert Griesemer</name>
<email>gri@golang.org</email>
</author>
<published>2019-10-15T20:44:22Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=444ad952c4dd346955362165aa20d0b4938ffcca'/>
<id>urn:sha1:444ad952c4dd346955362165aa20d0b4938ffcca</id>
<content type='text'>
Do not modify the underlying Rat denominator when calling
one of the accessors Float32, Float64; verify that we don't
modify the Rat denominator when calling Inv, Sign, IsInt, Num.

For #36689.
For #34919.
For #33792.

Change-Id: Ife6d1252373f493a597398ee51e7b5695b708df5
Reviewed-on: https://go-review.googlesource.com/c/go/+/201205
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
Reviewed-on: https://go-review.googlesource.com/c/go/+/233321
Run-TryBot: Dmitri Shuralyov &lt;dmitshur@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Emmanuel Odeke &lt;emm.odeke@gmail.com&gt;
</content>
</entry>
<entry>
<title>[release-branch.go1.13] runtime: disable preemption in startTemplateThread</title>
<updated>2020-05-27T17:55:05Z</updated>
<author>
<name>Michael Pratt</name>
<email>mpratt@google.com</email>
</author>
<published>2020-05-07T22:13:21Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=1a1178122f31bfe67534ec637883636755adbfbc'/>
<id>urn:sha1:1a1178122f31bfe67534ec637883636755adbfbc</id>
<content type='text'>
When a locked M wants to start a new M, it hands off to the template
thread to actually call clone and start the thread. The template thread
is lazily created the first time a thread is locked (or if cgo is in
use).

stoplockedm will release the P (_Pidle), then call handoffp to give the
P to another M. In the case of a pending STW, one of two things can
happen:

1. handoffp starts an M, which does acquirep followed by schedule, which
will finally enter _Pgcstop.

2. handoffp immediately enters _Pgcstop. This only occurs if the P has
no local work, GC work, and no spinning M is required.

If handoffp starts an M, and must create a new M to do so, then newm
will simply queue the M on newmHandoff for the template thread to do the
clone.

When a stop-the-world is required, stopTheWorldWithSema will start the
stop and then wait for all Ps to enter _Pgcstop. If the template thread
is not fully created because startTemplateThread gets stopped, then
another stoplockedm may queue an M that will never get created, and the
handoff P will never leave _Pidle. Thus stopTheWorldWithSema will wait
forever.

A sequence to trigger this hang when STW occurs can be visualized with
two threads:

  T1                                 T2
-------------------------------   -----------------------------

LockOSThread                      LockOSThread
  haveTemplateThread == 0
  startTemplateThread
    haveTemplateThread = 1
    newm                            haveTemplateThread == 1
      preempt -&gt; schedule           g.m.lockedExt++
        gcstopm -&gt; _Pgcstop         g.m.lockedg = ...
        park                        g.lockedm = ...
                                    return

                                 ... (any code)
                                   preempt -&gt; schedule
                                     stoplockedm
                                       releasep -&gt; _Pidle
                                       handoffp
                                         startm (first 3 handoffp cases)
                                          newm
                                            g.m.lockedExt != 0
                                            Add to newmHandoff, return
                                       park

Note that the P in T2 is stuck sitting in _Pidle. Since the template
thread isn't running, the new M will not be started complete the
transition to _Pgcstop.

To resolve this, we disable preemption around the assignment of
haveTemplateThread and the creation of the template thread in order to
guarantee that if handTemplateThread is set then the template thread
will eventually exist, in the presence of stops.

For #38931
Fixes #38932

Change-Id: I50535fbbe2f328f47b18e24d9030136719274191
Reviewed-on: https://go-review.googlesource.com/c/go/+/232978
Run-TryBot: Michael Pratt &lt;mpratt@google.com&gt;
Reviewed-by: Austin Clements &lt;austin@google.com&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
(cherry picked from commit 11b3730a02c93fd5745bfd977156541a9033759b)
Reviewed-on: https://go-review.googlesource.com/c/go/+/234888
Reviewed-by: Cherry Zhang &lt;cherryyz@google.com&gt;
</content>
</entry>
<entry>
<title>[release-branch.go1.13] go1.13.11</title>
<updated>2020-05-14T19:18:42Z</updated>
<author>
<name>Andrew Bonventre</name>
<email>andybons@golang.org</email>
</author>
<published>2020-05-14T18:13:47Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=237b6067c17ac3ef1e02632b77deefb5e9837cbb'/>
<id>urn:sha1:237b6067c17ac3ef1e02632b77deefb5e9837cbb</id>
<content type='text'>
Change-Id: I6fb5fbb3caf64e7d33412be4893edf8564e3a4de
Reviewed-on: https://go-review.googlesource.com/c/go/+/234001
Run-TryBot: Andrew Bonventre &lt;andybons@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Dmitri Shuralyov &lt;dmitshur@golang.org&gt;
</content>
</entry>
<entry>
<title>[release-branch.go1.13] cmd/compile: fix deallocation of live value copies in regalloc</title>
<updated>2020-04-28T16:29:29Z</updated>
<author>
<name>Michael Munday</name>
<email>mike.munday@ibm.com</email>
</author>
<published>2020-04-14T14:46:26Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=6b974e2bd3197bf6ff2245f5b24c0fccef352903'/>
<id>urn:sha1:6b974e2bd3197bf6ff2245f5b24c0fccef352903</id>
<content type='text'>
When deallocating the input register to a phi so that the phi
itself could be allocated to that register the code was also
deallocating all copies of that phi input value. Those copies
of the value could still be live and if they were the register
allocator could reuse them incorrectly to hold speculative
copies of other phi inputs. This causes strange bugs.

No test because this is a very obscure scenario that is hard
to replicate but CL 228060 adds an assertion to the compiler
that does trigger when running the std tests on linux/s390x
without this CL applied. Hopefully that assertion will prevent
future regressions.

Fixes #38442.

Change-Id: Id975dadedd731c7bb21933b9ea6b17daaa5c9e1d
Reviewed-on: https://go-review.googlesource.com/c/go/+/228061
Run-TryBot: Michael Munday &lt;mike.munday@ibm.com&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Keith Randall &lt;khr@golang.org&gt;
(cherry picked from commit 382fe3e2498f2066400e7e7007aa9903440e339d)
Reviewed-on: https://go-review.googlesource.com/c/go/+/230358
</content>
</entry>
</feed>
