Security
Headlines
HeadlinesLatestCVEs

Headline

CVE-2023-38689: Remove IOException escalation · RS485/LogisticsPipes@39a90b8

Logistics Pipes is a modification (a.k.a. mod) for the computer game Minecraft Java Edition. The mod used Java’s ObjectInputStream#readObject on untrusted data coming from clients or servers over the network resulting in possible remote code execution when sending specifically crafted network packets after connecting. The affected versions were released between 2013 and 2016 and the issue (back then unknown) was fixed in 2016 by a refactoring of the network IO code.
The issue is present in all Logistics Pipes versions ranged from 0.7.0.91 prior to 0.10.0.71, which were downloaded from different platforms summing up to multi-million downloads. For Minecraft version 1.7.10 the issue was fixed in build 0.10.0.71. Everybody on Minecraft 1.7.10 should check their version number of Logistics Pipes in their modlist and update, if the version number is smaller than 0.10.0.71. Any newer supported Minecraft version (like 1.12.2) never had a Logistics Pipes version with vulnerable code. The best available workaround for vulnerable versions is to play in singleplayer only or update to newer Minecraft versions and modpacks.

CVE
#java#rce

Expand Up @@ -39,11 +39,12 @@ @Sharable public class PacketHandler extends MessageToMessageCodec<FMLProxyPacket, ModernPacket> {
public static final Map<Integer, StackTraceElement[]> debugMap = new HashMap<>(); //TODO correct to work with WeakReference (See FML original) protected static final AttributeKey<ThreadLocal<FMLProxyPacket>> INBOUNDPACKETTRACKER = new AttributeKey<>(“lp:inboundpacket”); public static List<ModernPacket> packetlist; public static Map<Class<? extends ModernPacket>, ModernPacket> packetmap;
private static int packetDebugID = 1; public static final Map<Integer, StackTraceElement[]> debugMap = new HashMap<>();
@SuppressWarnings(“unchecked”) // Suppressed because this cast should never fail. Expand All @@ -60,18 +61,6 @@ public static <T extends ModernPacket> T getPacket(Class<T> clazz) { return packet; }
//horrible hack to carry the proper player for the side along… static class InboundModernPacketWrapper {
final ModernPacket packet; final EntityPlayer player;
InboundModernPacketWrapper(ModernPacket p, EntityPlayer e) { packet = p; player = e; } }
/* * enumerates all ModernPackets, sets their IDs and populate packetlist/packetmap */ Expand All @@ -97,15 +86,6 @@ public static final void initialize() { } }
//TODO correct to work with WeakReference (See FML original) protected static final AttributeKey<ThreadLocal<FMLProxyPacket>> INBOUNDPACKETTRACKER = new AttributeKey<>(“lp:inboundpacket”);
@Override public void handlerAdded(ChannelHandlerContext ctx) throws Exception { super.handlerAdded(ctx); ctx.attr(PacketHandler.INBOUNDPACKETTRACKER).set(new ThreadLocal<>()); }
//Used to provide the Description packet public static FMLProxyPacket toFMLPacket(ModernPacket msg) throws Exception { return PacketHandler.toFMLPacket(msg, MainProxy.networkChannelName); Expand All @@ -121,6 +101,44 @@ private static FMLProxyPacket toFMLPacket(ModernPacket msg, String channel) thro return new FMLProxyPacket(buffer, channel); }
//hacky callback to process packets coming from by the packetbufferhandler decompressors //TODO replace with proper netty implementation public static void onPacketData(final LPDataInput data, final EntityPlayer player) { if (player == null) { return; } final int packetID = data.readShort(); final ModernPacket packet = PacketHandler.packetlist.get(packetID).template(); packet.setDebugId(data.readInt()); packet.readData(data); PacketHandler.onPacketData(packet, player); }
private static void onPacketData(ModernPacket packet, final EntityPlayer player) { try { packet.processPacket(player); if (LPConstants.DEBUG) { PacketHandler.debugMap.remove(packet.getDebugId()); } } catch (DelayPacketException e) { if (packet.retry() && MainProxy.isClient(player.getEntityWorld())) { SimpleServiceLocator.clientBufferHandler.queueFailedPacket(packet, player); } else if (LPConstants.DEBUG) { LogisticsPipes.log.error(packet.getClass().getName()); LogisticsPipes.log.error(packet.toString()); e.printStackTrace(); } } catch (Exception e) { throw new RuntimeException(e); } }
@Override public void handlerAdded(ChannelHandlerContext ctx) throws Exception { super.handlerAdded(ctx); ctx.attr(PacketHandler.INBOUNDPACKETTRACKER).set(new ThreadLocal<>()); }
@Override protected final void encode(ChannelHandlerContext ctx, ModernPacket msg, List<Object> out) throws Exception { FMLProxyPacket proxy = PacketHandler.toFMLPacket(msg, ctx.channel().attr(NetworkRegistry.FML_CHANNEL).get()); Expand Down Expand Up @@ -150,35 +168,15 @@ public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws E super.exceptionCaught(ctx, cause); }
//hacky callback to process packets coming from by the packetbufferhandler decompressors //TODO replace with proper netty implementation public static void onPacketData(final LPDataInput data, final EntityPlayer player) throws IOException { if (player == null) { return; } final int packetID = data.readShort(); final ModernPacket packet = PacketHandler.packetlist.get(packetID).template(); packet.setDebugId(data.readInt()); packet.readData(data); PacketHandler.onPacketData(packet, player); } //horrible hack to carry the proper player for the side along… static class InboundModernPacketWrapper {
private static void onPacketData(ModernPacket packet, final EntityPlayer player) { try { packet.processPacket(player); if (LPConstants.DEBUG) { PacketHandler.debugMap.remove(packet.getDebugId()); } } catch (DelayPacketException e) { if (packet.retry() && MainProxy.isClient(player.getEntityWorld())) { SimpleServiceLocator.clientBufferHandler.queueFailedPacket(packet, player); } else if (LPConstants.DEBUG) { LogisticsPipes.log.error(packet.getClass().getName()); LogisticsPipes.log.error(packet.toString()); e.printStackTrace(); } } catch (Exception e) { throw new RuntimeException(e); final ModernPacket packet; final EntityPlayer player;
InboundModernPacketWrapper(ModernPacket p, EntityPlayer e) { packet = p; player = e; } } }

CVE: Latest News

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