Patch "m68k: q40: Fix info-leak in rtc_ioctl" has been added to the 4.9-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    m68k: q40: Fix info-leak in rtc_ioctl

to the 4.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     m68k-q40-fix-info-leak-in-rtc_ioctl.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit e3826fd76b7d572e307654d67ded15d5c9514db1
Author: Fuqian Huang <huangfq.daxian@xxxxxxxxx>
Date:   Fri Sep 27 20:15:44 2019 +0800

    m68k: q40: Fix info-leak in rtc_ioctl
    
    [ Upstream commit 7cf78b6b12fd5550545e4b73b35dca18bd46b44c ]
    
    When the option is RTC_PLL_GET, pll will be copied to userland
    via copy_to_user. pll is initialized using mach_get_rtc_pll indirect
    call and mach_get_rtc_pll is only assigned with function
    q40_get_rtc_pll in arch/m68k/q40/config.c.
    In function q40_get_rtc_pll, the field pll_ctrl is not initialized.
    This will leak uninitialized stack content to userland.
    Fix this by zeroing the uninitialized field.
    
    Signed-off-by: Fuqian Huang <huangfq.daxian@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20190927121544.7650-1-huangfq.daxian@xxxxxxxxx
    Signed-off-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/m68k/q40/config.c b/arch/m68k/q40/config.c
index ea89a24f46000..cc0f924bbdd2d 100644
--- a/arch/m68k/q40/config.c
+++ b/arch/m68k/q40/config.c
@@ -303,6 +303,7 @@ static int q40_get_rtc_pll(struct rtc_pll_info *pll)
 {
 	int tmp = Q40_RTC_CTRL;
 
+	pll->pll_ctrl = 0;
 	pll->pll_value = tmp & Q40_RTC_PLL_MASK;
 	if (tmp & Q40_RTC_PLL_SIGN)
 		pll->pll_value = -pll->pll_value;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux