From nobody Mon Dec 1 23:11:41 2025 Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 085EA3090DB for ; Wed, 26 Nov 2025 14:51:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764168712; cv=none; b=CoMNu6D2c/0dzJrQWu3vMW3FBgoGWs6jprppsMz2TVOJGB2nU5RhRxS3XO/lVPBw0cM4qNMLI6b6WN3wDoIwm05x6bAgXF07rv0W57m139wt5pAUc37e2sZhziBvLZItilhqtFuVSNM6CWV6bNyK1JbSC96AMt7ybKdFPhVcVb0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764168712; c=relaxed/simple; bh=o4IWWi9+q7B0v6wQZsxDGT8YBQgd4RT6GdDYjGDPnD4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=LCyK4fHV0VxZbzGPf7Ma1fh+1u34827wyXG1SEYM5VXjhREGEj9BQ9AMeulCSYmehwnhVEaQYlLuT8tmAScdd2hX3lv9a/LUUOu2flwL/k67DsmPTNPORQ7exCTlLwJ/N1BdO686LIEswGQUk51i3pvu8Ybc7HnEIoz2rDd7jBY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=BcpbCHbo; arc=none smtp.client-ip=209.85.128.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="BcpbCHbo" Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-477619f8ae5so38824235e9.3 for ; Wed, 26 Nov 2025 06:51:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1764168709; x=1764773509; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=1S2KpSi75pmmxUG2vF4349N9+vElvuySt02QpcCqbas=; b=BcpbCHbo8UT4G6owtw0nYNou02fE+whwP1MuVxsqyY6jrXyfIIQiEuEBaJHv+cMmuk Zq0o/VyTjuxj+UFNtHpqFOjPlGDBOYW5axCKznuJd8wFkIqTUxHHweDTV+CvGWmjuDDH PTO6lmux2lDWb7tqItSHU7UAh7arvCHZdP01pYW507CL2K92ZCDaHSCnMDqD4yq935tL Pw9eps8rb7i0Loqo9DxR8bMix49qgSPaotRj3ta2oBDjKcsOU9Nru4EcsA7PR+LvFvPJ mXpC6UxOS3MkjTarffwErfw3Q6t3IZVDnlsZBnJwWMKAVeSNzB9bwn6GeS7yW4GbuDV/ rrPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764168709; x=1764773509; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1S2KpSi75pmmxUG2vF4349N9+vElvuySt02QpcCqbas=; b=dB0mSMhfDSU/iAMPWS4GQGCOeNnqKt/oV9dxyW0Kq8WXN73fcj+29/P2SHzFzL8gZN zarnl+DiZGB02oDFrp3T13eiuZDP8aUsljrT0JLxRzqmPikzxp4DcgMRmOpOA8G9zKlD P56GvRlyemZDmYLV4wnEtwfIrZsL6fpFqExsvDDogR0lOPqqban//fHVLYQ06AlWEtgy TltdBQH++NSZmMFVdtV4E2TISjgLKjhqPU8d2rTBMbRa8Fim7OKYZuG3RGWoxdPYpJ8C +Nf1NywBvY4b72IXPDDXDmw60z22bO/fmhaHhJ8Jaob4Q4APZT0XB4wsi/zrUfgnsJdn mN1w== X-Forwarded-Encrypted: i=1; AJvYcCV073nQMswGU3BGCuDpDcKSvZOUWhjdusXsRAKYaPs44iRbFCkFDhYXxVJQTtywUW13ZAf8dp1xcA24kz4=@vger.kernel.org X-Gm-Message-State: AOJu0YyFjIWm/Df9ZCU72YqYcKLH2dl5CpJakQGDs9E+0c59hUPtj1+M yq9VwfweEtyX66vXSzcDCIWa8HZPxiMJSzE/l84fKMkTfeRHSS2LXWxpvuNcv/JliTk= X-Gm-Gg: ASbGncvT6NFujJHPIYFMfSPfbEk0y9qTAd3KkcU9BOQjT/eTBKF8sksPaFYg2oUtc9G y6ia+SA3dgkrWH9rLPuMfnTdTby1IodSk6X9zU8Jpfc+/A8yB6Gob5ATsTaCNUFKasWi08d0Aju huIX59/aZssG/+ixjzekWfs18ZRJrMivZYKyZ0kGBsSr9w4bbawMlBqqKXvrphLLjLSSwuQbAlk rDtcgAjbI7ZSC9Jr6xHJqSpVpAxcEXUburMpYNz9gCg2xgrBhrdg+zyFJP3yC9BkES5xahRXuDQ u30fYbxj5shBC5HP4doa5066Xw1REq38ZTjxDPFfENfjxe5e9Rum8VXA9GqN1OYJkpgOg6tRfqa MGI0TER9l8oGia9gbElGOMJfBbi1KvhIcr0AHZNvmyjhn8sj68/xfX8nQ6YA6RlkuNX99Hvbaom IuVNI76eaKhiE3LyI= X-Google-Smtp-Source: AGHT+IEuwAOPrNW5oUvQzHcIxlCSXmrge88VlhaoqHgLHKG0m03XrFwlG7vjElXaCY9J4aa2xALqVQ== X-Received: by 2002:a05:600c:a08:b0:477:7b16:5fa6 with SMTP id 5b1f17b1804b1-477c0162e8emr189385105e9.3.1764168708835; Wed, 26 Nov 2025 06:51:48 -0800 (PST) Received: from localhost ([41.210.159.101]) by smtp.gmail.com with UTF8SMTPSA id 5b1f17b1804b1-4790552c3c9sm45785065e9.0.2025.11.26.06.51.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Nov 2025 06:51:48 -0800 (PST) Date: Wed, 26 Nov 2025 17:51:40 +0300 From: Dan Carpenter To: Pasha Tatashin Cc: Mike Rapoport , Pratyush Yadav , Andrew Morton , linux-kernel@vger.kernel.org Subject: [PATCH 2/2] liveupdate: luo_session: Fix use after free in luo_session_deserialize() Message-ID: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The debug output frees "session" but it was freed on the previous line. Move the free after the printk(). Fixes: 7eeeec7e1690 ("liveupdate: luo_session: add sessions support") Signed-off-by: Dan Carpenter --- kernel/liveupdate/luo_session.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/liveupdate/luo_session.c b/kernel/liveupdate/luo_sessio= n.c index a572bf689712..b86d45c9dcbd 100644 --- a/kernel/liveupdate/luo_session.c +++ b/kernel/liveupdate/luo_session.c @@ -553,9 +553,9 @@ int luo_session_deserialize(void) =20 err =3D luo_session_insert(sh, session); if (err) { - luo_session_free(session); pr_warn("Failed to insert session [%s] %pe\n", session->name, ERR_PTR(err)); + luo_session_free(session); return err; } =20 --=20 2.51.0