Security
Headlines
HeadlinesLatestCVEs

Headline

CVE-2021-21293: Merge pull request from GHSA-xmw9-q7x9-j5qc · http4s/blaze@4f78617

blaze is a Scala library for building asynchronous pipelines, with a focus on network IO. All servers running blaze-core before version 0.14.15 are affected by a vulnerability in which unbounded connection acceptance leads to file handle exhaustion. Blaze, accepts connections unconditionally on a dedicated thread pool. This has the net effect of amplifying degradation in services that are unable to handle their current request load, since incoming connections are still accepted and added to an unbounded queue. Each connection allocates a socket handle, which drains a scarce OS resource. This can also confound higher level circuit breakers which work based on detecting failed connections. The vast majority of affected users are using it as part of http4s-blaze-server <= 0.21.16. http4s provides a mechanism for limiting open connections, but is enforced inside the Blaze accept loop, after the connection is accepted and the socket opened. Thus, the limit only prevents the number of connections which can be simultaneously processed, not the number of connections which can be held open. The issue is fixed in version 0.14.15 for "NIO1SocketServerGroup". A “maxConnections” parameter is added, with a default value of 512. Concurrent connections beyond this limit are rejected. To run unbounded, which is not recommended, set a negative number. The “NIO2SocketServerGroup” has no such setting and is now deprecated. There are several possible workarounds described in the refrenced GitHub Advisory GHSA-xmw9-q7x9-j5qc.

CVE
#vulnerability#apache#git#java

@@ -0,0 +1,69 @@

/*

* Copyright 2014 http4s.org

*

* Licensed under the Apache License, Version 2.0 (the “License”);

* you may not use this file except in compliance with the License.

* You may obtain a copy of the License at

*

* http://www.apache.org/licenses/LICENSE-2.0

*

* Unless required by applicable law or agreed to in writing, software

* distributed under the License is distributed on an “AS IS” BASIS,

* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

* See the License for the specific language governing permissions and

* limitations under the License.

*/

package org.http4s.blaze.channel.nio1

import org.http4s.blaze.channel.{ChannelOptions, OptionValue}

import java.net.SocketAddress

import java.nio.ByteBuffer

import java.nio.channels.{SelectableChannel, SocketChannel}

import java.util.concurrent.atomic.AtomicBoolean

private[blaze] final class NIO1ClientChannel(

private[this] val underlying: SocketChannel,

private[this] val onClose: () => Unit)

extends NIO1Channel {

private[this] val closed = new AtomicBoolean(false)

override val selectableChannel: SelectableChannel = underlying

def configureBlocking(block: Boolean): Unit = {

underlying.configureBlocking(block)

()

}

def getRemoteAddress: SocketAddress =

underlying.getRemoteAddress

def getLocalAddress: SocketAddress =

underlying.getLocalAddress

def configureOptions(options: ChannelOptions): Unit =

options.options.foreach { case OptionValue(k, v) =>

underlying.setOption(k, v)

}

def read(dst: ByteBuffer): Int =

underlying.read(dst)

def write(src: ByteBuffer): Int =

underlying.write(src)

def write(srcs: Array[ByteBuffer]): Long =

underlying.write(srcs)

def isOpen: Boolean =

underlying.isOpen

override def close(): Unit =

try underlying.close()

finally if (closed.compareAndSet(false, true)) {

onClose()

}

}

CVE: Latest News

CVE-2023-50976: Transactions API Authorization by oleiman · Pull Request #14969 · redpanda-data/redpanda
CVE-2023-6905
CVE-2023-6903
CVE-2023-6904
CVE-2023-3907