<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys, branch stable/11</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>zlib: Fix a bug when getting a gzip header extra field with inflate().</title>
<updated>2023-01-24T22:27:50+00:00</updated>
<author>
<name>Mark Adler</name>
<email>fork@madler.net</email>
</author>
<published>2022-07-30T22:51:11+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=e59d10aff6edc088850be553252020230a560514'/>
<id>e59d10aff6edc088850be553252020230a560514</id>
<content type='text'>
If the extra field was larger than the space the user provided with
inflateGetHeader(), and if multiple calls of inflate() delivered
the extra header data, then there could be a buffer overflow of the
provided space. This commit assures that provided space is not
exceeded.

(cherry picked from zlib commit eff308af425b67093bab25f80f1ae950166bece1)
(cherry picked from zlib commit 1eb7682f845ac9e9bf9ae35bbfb3bad5dacbd91d)

(cherry picked from commit dc3509f1aafcd966f3dd9226115cf94b691ff3c7)
(cherry picked from commit 2969066f73fc67a614144ac09b9f3f5291937fed)
(cherry picked from commit 10cc2bf5f7a592981ee00d22eb13e100beed1e64)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the extra field was larger than the space the user provided with
inflateGetHeader(), and if multiple calls of inflate() delivered
the extra header data, then there could be a buffer overflow of the
provided space. This commit assures that provided space is not
exceeded.

(cherry picked from zlib commit eff308af425b67093bab25f80f1ae950166bece1)
(cherry picked from zlib commit 1eb7682f845ac9e9bf9ae35bbfb3bad5dacbd91d)

(cherry picked from commit dc3509f1aafcd966f3dd9226115cf94b691ff3c7)
(cherry picked from commit 2969066f73fc67a614144ac09b9f3f5291937fed)
(cherry picked from commit 10cc2bf5f7a592981ee00d22eb13e100beed1e64)
</pre>
</div>
</content>
</entry>
<entry>
<title>tcp: Correctly compute the retransmit length for all 64-bit platforms.</title>
<updated>2022-06-06T20:09:38+00:00</updated>
<author>
<name>Hans Petter Selasky</name>
<email>hselasky@FreeBSD.org</email>
</author>
<published>2022-06-02T18:33:21+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=bc92b6240ddf6ab11813abe439653308da14ee54'/>
<id>bc92b6240ddf6ab11813abe439653308da14ee54</id>
<content type='text'>
When the TCP sequence number subtracted is greater than 2**32 minus
the window size, or 2**31 minus the window size, the use of unsigned
long as an intermediate variable, may result in an incorrect retransmit
length computation on all 64-bit platforms.

While at it create a helper macro to facilitate the computation of
the difference between two TCP sequence numbers.

Differential Revision:	https://reviews.freebsd.org/D35388
Reviewed by:	rscheff
Sponsored by:	NVIDIA Networking

(cherry picked from commit 28173d49dccb91e50be9c401dbad1da908a5dc75)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When the TCP sequence number subtracted is greater than 2**32 minus
the window size, or 2**31 minus the window size, the use of unsigned
long as an intermediate variable, may result in an incorrect retransmit
length computation on all 64-bit platforms.

While at it create a helper macro to facilitate the computation of
the difference between two TCP sequence numbers.

Differential Revision:	https://reviews.freebsd.org/D35388
Reviewed by:	rscheff
Sponsored by:	NVIDIA Networking

(cherry picked from commit 28173d49dccb91e50be9c401dbad1da908a5dc75)
</pre>
</div>
</content>
</entry>
<entry>
<title>xhci(4): Always add and evaluate the slot context.</title>
<updated>2022-05-04T07:30:12+00:00</updated>
<author>
<name>Hans Petter Selasky</name>
<email>hselasky@FreeBSD.org</email>
</author>
<published>2022-05-03T16:10:49+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=cacb5f3ea5d39d9ee02e6f278993fb1b308ca9ba'/>
<id>cacb5f3ea5d39d9ee02e6f278993fb1b308ca9ba</id>
<content type='text'>
Because the maximum number of endpoint contexts is stored there.

Tested by:	ehaupt@
PR:		262882
Sponsored by:	NVIDIA Networking

(cherry picked from commit 09dd1adfa4c9bb1b49f4ef5524a308732883e132)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Because the maximum number of endpoint contexts is stored there.

Tested by:	ehaupt@
PR:		262882
Sponsored by:	NVIDIA Networking

(cherry picked from commit 09dd1adfa4c9bb1b49f4ef5524a308732883e132)
</pre>
</div>
</content>
</entry>
<entry>
<title>xhci(4): Only drop BULK and INTERRUPT endpoints to reset data toggle.</title>
<updated>2022-05-04T07:30:07+00:00</updated>
<author>
<name>Hans Petter Selasky</name>
<email>hselasky@FreeBSD.org</email>
</author>
<published>2022-05-03T16:09:17+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=a1ec8baee5dd0cb8e344ab0e2feafcf49f4a802a'/>
<id>a1ec8baee5dd0cb8e344ab0e2feafcf49f4a802a</id>
<content type='text'>
Only drop BULK and INTERRUPT endpoints, to reset the data toggle,
because for other endpoint types this is not critical.

Tested by:	ehaupt@
PR:		262882
Sponsored by:	NVIDIA Networking

(cherry picked from commit e276d281503160ba3648bd394cde95736ee53329)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Only drop BULK and INTERRUPT endpoints, to reset the data toggle,
because for other endpoint types this is not critical.

Tested by:	ehaupt@
PR:		262882
Sponsored by:	NVIDIA Networking

(cherry picked from commit e276d281503160ba3648bd394cde95736ee53329)
</pre>
</div>
</content>
</entry>
<entry>
<title>xhci(4): Ensure the so-called data toggle gets properly reset.</title>
<updated>2022-04-27T19:17:46+00:00</updated>
<author>
<name>Hans Petter Selasky</name>
<email>hselasky@FreeBSD.org</email>
</author>
<published>2022-04-21T14:59:09+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=683c36ae04abac55841271b3d9a65c0eb5b7155c'/>
<id>683c36ae04abac55841271b3d9a65c0eb5b7155c</id>
<content type='text'>
Use the drop and enable endpoint context commands to force a reset of
the data toggle for USB 2.0 and USB 3.0 after:
 - clear endpoint halt command (when the driver wishes).
 - set config command (when the kernel or user-space wants).
 - set alternate setting command (only affected endpoints).

Some XHCI HW implementations may not allow the endpoint reset command when
the endpoint context is not in the halted state.

Reported by:		Juniper and Gary Jennejohn
Sponsored by:		NVIDIA Networking

(cherry picked from commit cda31e734925346328fd2369585ab3f6767ec225)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use the drop and enable endpoint context commands to force a reset of
the data toggle for USB 2.0 and USB 3.0 after:
 - clear endpoint halt command (when the driver wishes).
 - set config command (when the kernel or user-space wants).
 - set alternate setting command (only affected endpoints).

Some XHCI HW implementations may not allow the endpoint reset command when
the endpoint context is not in the halted state.

Reported by:		Juniper and Gary Jennejohn
Sponsored by:		NVIDIA Networking

(cherry picked from commit cda31e734925346328fd2369585ab3f6767ec225)
</pre>
</div>
</content>
</entry>
<entry>
<title>No need to stop XHCI endpoints in disabled state.</title>
<updated>2022-04-27T19:17:40+00:00</updated>
<author>
<name>Hans Petter Selasky</name>
<email>hselasky@FreeBSD.org</email>
</author>
<published>2020-12-23T10:54:42+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=b199e55ce6d9ec938933cb86fbad04fb064910d9'/>
<id>b199e55ce6d9ec938933cb86fbad04fb064910d9</id>
<content type='text'>
Some AMD XHCI implementations apparently assert a permanent
internal failure if this happens.

Submitted by:	ali.abdallah@suse.com
PR:		251503
Sponsored by:	Mellanox Technologies // NVIDIA Networking

(cherry picked from commit 1622a498525b4ef0d23d30a587b9a3888c3ee0d5)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some AMD XHCI implementations apparently assert a permanent
internal failure if this happens.

Submitted by:	ali.abdallah@suse.com
PR:		251503
Sponsored by:	Mellanox Technologies // NVIDIA Networking

(cherry picked from commit 1622a498525b4ef0d23d30a587b9a3888c3ee0d5)
</pre>
</div>
</content>
</entry>
<entry>
<title>net80211: validate Mesh ID length in ieee80211_parse_beacon</title>
<updated>2022-04-06T14:19:42+00:00</updated>
<author>
<name>Bjoern A. Zeeb</name>
<email>bz@FreeBSD.org</email>
</author>
<published>2022-04-05T22:52:51+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=9752bffbcfbadf1749a2c12449603952c61bb4ab'/>
<id>9752bffbcfbadf1749a2c12449603952c61bb4ab</id>
<content type='text'>
Reported by:	m00nbsd working with Trend Micro Zero Day Initiative

(cherry picked from commit fb8c87b4f3bfdfac014f9d894fe75fbad0391b24)
(cherry picked from commit 72617f9246e3a4be28eeafeae1bdd983143eef3e)
(cherry picked from commit e7c990ba3f8de8c4882390cad9b01a9fa25ad068)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reported by:	m00nbsd working with Trend Micro Zero Day Initiative

(cherry picked from commit fb8c87b4f3bfdfac014f9d894fe75fbad0391b24)
(cherry picked from commit 72617f9246e3a4be28eeafeae1bdd983143eef3e)
(cherry picked from commit e7c990ba3f8de8c4882390cad9b01a9fa25ad068)
</pre>
</div>
</content>
</entry>
<entry>
<title>mpr/mps/mpt: verify cfg page ioctl lengths</title>
<updated>2022-04-06T14:19:28+00:00</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2022-03-28T13:33:54+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=b2bdfad93ba8567c40a01728a35d732e3206716d'/>
<id>b2bdfad93ba8567c40a01728a35d732e3206716d</id>
<content type='text'>
*_CFG_PAGE ioctl handlers in the mpr, mps, and mpt drivers allocated a
buffer of a caller-specified size, but copied to it a fixed size header.
Add checks that the size is at least the required minimum.

Note that the device nodes are owned by root:operator with 0640
permissions so the ioctls are not available to unprivileged users.

This change includes suggestions from scottl, markj and mav.

Two of the mpt cases were reported by Lucas Leong (@_wmliang_) of
Trend Micro Zero Day Initiative; scottl reported the third case in mpt.
Same issue found in mpr and mps after discussion with imp.

Reported by:	Lucas Leong (@_wmliang_), Trend Micro Zero Day Initiative
Reviewed by:	imp, mav
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D34692

(cherry picked from commit 8276c4149b5fc7c755d6b244fbbf6dae1939f087)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
*_CFG_PAGE ioctl handlers in the mpr, mps, and mpt drivers allocated a
buffer of a caller-specified size, but copied to it a fixed size header.
Add checks that the size is at least the required minimum.

Note that the device nodes are owned by root:operator with 0640
permissions so the ioctls are not available to unprivileged users.

This change includes suggestions from scottl, markj and mav.

Two of the mpt cases were reported by Lucas Leong (@_wmliang_) of
Trend Micro Zero Day Initiative; scottl reported the third case in mpt.
Same issue found in mpr and mps after discussion with imp.

Reported by:	Lucas Leong (@_wmliang_), Trend Micro Zero Day Initiative
Reviewed by:	imp, mav
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D34692

(cherry picked from commit 8276c4149b5fc7c755d6b244fbbf6dae1939f087)
</pre>
</div>
</content>
</entry>
<entry>
<title>zlib: apply upstream fix for CVE-2018-25032</title>
<updated>2022-04-04T11:00:46+00:00</updated>
<author>
<name>Eugene Grosbein</name>
<email>eugen@FreeBSD.org</email>
</author>
<published>2022-04-04T11:00:46+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=7f4fcc62edee9b3dad47ae542a5be942b5df6552'/>
<id>7f4fcc62edee9b3dad47ae542a5be942b5df6552</id>
<content type='text'>
Fix memory corruption when deflating (i.e., when compressing)
if the input has many distant matches.

This is direct commit to stable/11 using unmodified upstream fix
https://github.com/madler/zlib/commit/5c44459c3b28a9bd3283aaceab7c615f8020c531

Security:	CVE-2018-25032
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix memory corruption when deflating (i.e., when compressing)
if the input has many distant matches.

This is direct commit to stable/11 using unmodified upstream fix
https://github.com/madler/zlib/commit/5c44459c3b28a9bd3283aaceab7c615f8020c531

Security:	CVE-2018-25032
</pre>
</div>
</content>
</entry>
<entry>
<title>netmap: Fix TOCTOU vulnerability in nmreq_copyin</title>
<updated>2022-03-30T22:08:32+00:00</updated>
<author>
<name>Vincenzo Maffione</name>
<email>vmaffione@FreeBSD.org</email>
</author>
<published>2022-03-16T06:58:50+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=725c70d8153f4bddf95bdd07e2c7b4b9399643f6'/>
<id>725c70d8153f4bddf95bdd07e2c7b4b9399643f6</id>
<content type='text'>
The total size of the user-provided nmreq was first computed and then
trusted during the copyin. This might lead to kernel memory corruption
and escape from jails/containers.

Reported by: Lucas Leong (@_wmliang_) of Trend Micro Zero Day Initiative
Security: CVE-2022-23084
MFC after:	3 days

(cherry picked from commit 393729916564ed13f966e09129a24e6931898d12)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The total size of the user-provided nmreq was first computed and then
trusted during the copyin. This might lead to kernel memory corruption
and escape from jails/containers.

Reported by: Lucas Leong (@_wmliang_) of Trend Micro Zero Day Initiative
Security: CVE-2022-23084
MFC after:	3 days

(cherry picked from commit 393729916564ed13f966e09129a24e6931898d12)
</pre>
</div>
</content>
</entry>
</feed>
