[openssh-portable] Suppress instance of function type mismatch UB

atomicio6 accepts a function as an argument which can either be read or
write. But write takes a const void* as its second argument whereas read
takes a regular void*, resulting in a function type mismatch when passed
to atomicio6. Ideally, we'd have two separate functions that take a read
xor write argument, but this is simpler.

Bug: 128274
Change-Id: I0250dd5aba379ed8ae338c31a3b1c1c13cae0712
Reviewed-on: https://fuchsia-review.googlesource.com/c/third_party/openssh-portable/+/865489
Reviewed-by: Petr Hosek <phosek@google.com>
Commit-Queue: Leonard Chan <leonardchan@google.com>
1 file changed
tree: e18740a57561eca89c8f99310705a98050aaf228
  1. .github/
  2. contrib/
  3. fuchsia/
  4. m4/
  5. openbsd-compat/
  6. regress/
  7. .depend
  8. .git_allowed_signers
  9. .git_allowed_signers.asc
  10. .gitignore
  11. .skipped-commit-ids
  12. addr.c
  13. addr.h
  14. addrmatch.c
  15. atomicio.c
  16. atomicio.h
  17. audit-bsm.c
  18. audit-linux.c
  19. audit.c
  20. audit.h
  21. auth-bsdauth.c
  22. auth-krb5.c
  23. auth-options.c
  24. auth-options.h
  25. auth-pam.c
  26. auth-pam.h
  27. auth-passwd.c
  28. auth-rhosts.c
  29. auth-shadow.c
  30. auth-sia.c
  31. auth-sia.h
  32. auth.c
  33. auth.h
  34. auth2-chall.c
  35. auth2-gss.c
  36. auth2-hostbased.c
  37. auth2-kbdint.c
  38. auth2-none.c
  39. auth2-passwd.c
  40. auth2-pubkey.c
  41. auth2-pubkeyfile.c
  42. auth2.c
  43. authfd.c
  44. authfd.h
  45. authfile.c
  46. authfile.h
  47. bitmap.c
  48. bitmap.h
  49. BUILD.gn
  50. buildpkg.sh.in
  51. canohost.c
  52. canohost.h
  53. chacha.c
  54. chacha.h
  55. channels.c
  56. channels.h
  57. cipher-aes.c
  58. cipher-aesctr.c
  59. cipher-aesctr.h
  60. cipher-chachapoly-libcrypto.c
  61. cipher-chachapoly.c
  62. cipher-chachapoly.h
  63. cipher.c
  64. cipher.h
  65. cleanup.c
  66. clientloop.c
  67. clientloop.h
  68. compat.c
  69. compat.h
  70. configure.ac
  71. CREDITS
  72. crypto_api.h
  73. defines.h
  74. dh.c
  75. dh.h
  76. digest-libc.c
  77. digest-openssl.c
  78. digest.h
  79. dispatch.c
  80. dispatch.h
  81. dns.c
  82. dns.h
  83. ed25519.c
  84. entropy.c
  85. entropy.h
  86. fatal.c
  87. fe25519.c
  88. fe25519.h
  89. fixalgorithms
  90. fixpaths
  91. ge25519.c
  92. ge25519.h
  93. ge25519_base.data
  94. groupaccess.c
  95. groupaccess.h
  96. gss-genr.c
  97. gss-serv-krb5.c
  98. gss-serv.c
  99. hash.c
  100. hmac.c
  101. hmac.h
  102. hostfile.c
  103. hostfile.h
  104. includes.h
  105. INSTALL
  106. install-sh
  107. kex.c
  108. kex.h
  109. kexc25519.c
  110. kexdh.c
  111. kexecdh.c
  112. kexgen.c
  113. kexgex.c
  114. kexgexc.c
  115. kexgexs.c
  116. kexsntrup761x25519.c
  117. krl.c
  118. krl.h
  119. LICENCE
  120. log.c
  121. log.h
  122. loginrec.c
  123. loginrec.h
  124. logintest.c
  125. mac.c
  126. mac.h
  127. Makefile.in
  128. match.c
  129. match.h
  130. mdoc2man.awk
  131. misc.c
  132. misc.h
  133. mkinstalldirs
  134. moduli
  135. moduli.5
  136. moduli.c
  137. monitor.c
  138. monitor.h
  139. monitor_fdpass.c
  140. monitor_fdpass.h
  141. monitor_wrap.c
  142. monitor_wrap.h
  143. msg.c
  144. msg.h
  145. mux.c
  146. myproposal.h
  147. nchan.c
  148. nchan.ms
  149. nchan2.ms
  150. openssh.xml.in
  151. opensshd.init.in
  152. OVERVIEW
  153. OWNERS
  154. packet.c
  155. packet.h
  156. pathnames.h
  157. pkcs11.h
  158. platform-misc.c
  159. platform-pledge.c
  160. platform-tracing.c
  161. platform.c
  162. platform.h
  163. poly1305.c
  164. poly1305.h
  165. progressmeter.c
  166. progressmeter.h
  167. PROTOCOL
  168. PROTOCOL.agent
  169. PROTOCOL.certkeys
  170. PROTOCOL.chacha20poly1305
  171. PROTOCOL.key
  172. PROTOCOL.krl
  173. PROTOCOL.mux
  174. PROTOCOL.sshsig
  175. PROTOCOL.u2f
  176. readconf.c
  177. readconf.h
  178. README
  179. README.dns
  180. README.fuchsia
  181. README.md
  182. README.platform
  183. README.privsep
  184. README.tun
  185. readpass.c
  186. regen.sh
  187. rijndael.c
  188. rijndael.h
  189. sandbox-capsicum.c
  190. sandbox-darwin.c
  191. sandbox-null.c
  192. sandbox-pledge.c
  193. sandbox-rlimit.c
  194. sandbox-seccomp-filter.c
  195. sandbox-solaris.c
  196. sandbox-systrace.c
  197. sc25519.c
  198. sc25519.h
  199. scp.1
  200. scp.c
  201. SECURITY.md
  202. servconf.c
  203. servconf.h
  204. serverloop.c
  205. serverloop.h
  206. session.c
  207. session.h
  208. sftp-client.c
  209. sftp-client.h
  210. sftp-common.c
  211. sftp-common.h
  212. sftp-glob.c
  213. sftp-realpath.c
  214. sftp-server-main.c
  215. sftp-server.8
  216. sftp-server.c
  217. sftp-usergroup.c
  218. sftp-usergroup.h
  219. sftp.1
  220. sftp.c
  221. sftp.h
  222. sk-api.h
  223. sk-usbhid.c
  224. smult_curve25519_ref.c
  225. sntrup761.c
  226. sntrup761.sh
  227. srclimit.c
  228. srclimit.h
  229. ssh-add.1
  230. ssh-add.c
  231. ssh-agent.1
  232. ssh-agent.c
  233. ssh-dss.c
  234. ssh-ecdsa-sk.c
  235. ssh-ecdsa.c
  236. ssh-ed25519-sk.c
  237. ssh-ed25519.c
  238. ssh-gss.h
  239. ssh-keygen.1
  240. ssh-keygen.c
  241. ssh-keyscan.1
  242. ssh-keyscan.c
  243. ssh-keysign.8
  244. ssh-keysign.c
  245. ssh-pkcs11-client.c
  246. ssh-pkcs11-helper.8
  247. ssh-pkcs11-helper.c
  248. ssh-pkcs11.c
  249. ssh-pkcs11.h
  250. ssh-rsa.c
  251. ssh-sandbox.h
  252. ssh-sk-client.c
  253. ssh-sk-helper.8
  254. ssh-sk-helper.c
  255. ssh-sk.c
  256. ssh-sk.h
  257. ssh-xmss.c
  258. ssh.1
  259. ssh.c
  260. ssh.h
  261. ssh2.h
  262. ssh_api.c
  263. ssh_api.h
  264. ssh_config
  265. ssh_config.5
  266. sshbuf-getput-basic.c
  267. sshbuf-getput-crypto.c
  268. sshbuf-io.c
  269. sshbuf-misc.c
  270. sshbuf.c
  271. sshbuf.h
  272. sshconnect.c
  273. sshconnect.h
  274. sshconnect2.c
  275. sshd.8
  276. sshd.c
  277. sshd_config
  278. sshd_config.5
  279. ssherr.c
  280. ssherr.h
  281. sshkey-xmss.c
  282. sshkey-xmss.h
  283. sshkey.c
  284. sshkey.h
  285. sshlogin.c
  286. sshlogin.h
  287. sshpty.c
  288. sshpty.h
  289. sshsig.c
  290. sshsig.h
  291. sshtty.c
  292. survey.sh.in
  293. TODO
  294. ttymodes.c
  295. ttymodes.h
  296. uidswap.c
  297. uidswap.h
  298. umac.c
  299. umac.h
  300. umac128.c
  301. utf8.c
  302. utf8.h
  303. verify.c
  304. version.h
  305. xmalloc.c
  306. xmalloc.h
  307. xmss_commons.c
  308. xmss_commons.h
  309. xmss_fast.c
  310. xmss_fast.h
  311. xmss_hash.c
  312. xmss_hash.h
  313. xmss_hash_address.c
  314. xmss_hash_address.h
  315. xmss_wots.c
  316. xmss_wots.h
README.md

Portable OpenSSH

C/C++ CI Fuzzing Status

OpenSSH is a complete implementation of the SSH protocol (version 2) for secure remote login, command execution and file transfer. It includes a client ssh and server sshd, file transfer utilities scp and sftp as well as tools for key generation (ssh-keygen), run-time key storage (ssh-agent) and a number of supporting programs.

This is a port of OpenBSD's OpenSSH to most Unix-like operating systems, including Linux, OS X and Cygwin. Portable OpenSSH polyfills OpenBSD APIs that are not available elsewhere, adds sshd sandboxing for more operating systems and includes support for OS-native authentication and auditing (e.g. using PAM).

Documentation

The official documentation for OpenSSH are the man pages for each tool:

Stable Releases

Stable release tarballs are available from a number of download mirrors. We recommend the use of a stable release for most users. Please read the release notes for details of recent changes and potential incompatibilities.

Building Portable OpenSSH

Dependencies

Portable OpenSSH is built using autoconf and make. It requires a working C compiler, standard library and headers.

libcrypto from either LibreSSL or OpenSSL may also be used. OpenSSH may be built without either of these, but the resulting binaries will have only a subset of the cryptographic algorithms normally available.

zlib is optional; without it transport compression is not supported.

FIDO security token support needs libfido2 and its dependencies.

In addition, certain platforms and build-time options may require additional dependencies; see README.platform for details about your platform.

Building a release

Releases include a pre-built copy of the configure script and may be built using:

tar zxvf openssh-X.YpZ.tar.gz
cd openssh
./configure # [options]
make && make tests

See the Build-time Customisation section below for configure options. If you plan on installing OpenSSH to your system, then you will usually want to specify destination paths.

Building from git

If building from git, you'll need autoconf installed to build the configure script. The following commands will check out and build portable OpenSSH from git:

git clone https://github.com/openssh/openssh-portable # or https://anongit.mindrot.org/openssh.git
cd openssh-portable
autoreconf
./configure
make && make tests

Build-time Customisation

There are many build-time customisation options available. All Autoconf destination path flags (e.g. --prefix) are supported (and are usually required if you want to install OpenSSH).

For a full list of available flags, run ./configure --help but a few of the more frequently-used ones are described below. Some of these flags will require additional libraries and/or headers be installed.

FlagMeaning
--with-pamEnable PAM support. OpenPAM, Linux PAM and Solaris PAM are supported.
--with-libeditEnable libedit support for sftp.
--with-kerberos5Enable Kerberos/GSSAPI support. Both Heimdal and MIT Kerberos implementations are supported.
--with-selinuxEnable SELinux support.
--with-security-key-builtinInclude built-in support for U2F/FIDO2 security keys. This requires libfido2 be installed.

Development

Portable OpenSSH development is discussed on the openssh-unix-dev mailing list (archive mirror). Bugs and feature requests are tracked on our Bugzilla.

Reporting bugs

Non-security bugs may be reported to the developers via Bugzilla or via the mailing list above. Security bugs should be reported to openssh@openssh.com.