Re: [PATCH 5.15.y] pps: Fix a use-after-free

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

 



[ Sasha's backport helper bot ]

Hi,

Found matching upstream commit: c79a39dc8d060b9e64e8b0fa9d245d44befeefbe


Status in newer kernel trees:
6.13.y | Present (different SHA1: d487d68916ad)
6.12.y | Present (different SHA1: 2423d77f7ee9)
6.6.y | Present (different SHA1: 73f8d5a93c8f)
6.1.y | Not found
5.15.y | Not found

Note: The patch differs from the upstream commit:
---
1:  c79a39dc8d060 ! 1:  a6ade3f07d2ea pps: Fix a use-after-free
    @@ Commit message
         Reviewed-by: Michal Schmidt <mschmidt@xxxxxxxxxx>
         Link: https://lore.kernel.org/r/a17975fd5ae99385791929e563f72564edbcf28f.1731383727.git.calvin@xxxxxxxxxx
         Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
    +    (cherry picked from commit c79a39dc8d060b9e64e8b0fa9d245d44befeefbe)
    +    Signed-off-by: Calvin Owens <calvin@xxxxxxxxxx>
     
      ## drivers/pps/clients/pps-gpio.c ##
     @@ drivers/pps/clients/pps-gpio.c: static int pps_gpio_probe(struct platform_device *pdev)
    @@ drivers/pps/clients/pps-ktimer.c: static int __init pps_ktimer_init(void)
      }
     
      ## drivers/pps/clients/pps-ldisc.c ##
    -@@ drivers/pps/clients/pps-ldisc.c: static void pps_tty_dcd_change(struct tty_struct *tty, bool active)
    - 	pps_event(pps, &ts, active ? PPS_CAPTUREASSERT :
    +@@ drivers/pps/clients/pps-ldisc.c: static void pps_tty_dcd_change(struct tty_struct *tty, unsigned int status)
    + 	pps_event(pps, &ts, status ? PPS_CAPTUREASSERT :
      			PPS_CAPTURECLEAR, NULL);
      
     -	dev_dbg(pps->dev, "PPS %s at %lu\n",
     +	dev_dbg(&pps->dev, "PPS %s at %lu\n",
    - 			active ? "assert" : "clear", jiffies);
    + 			status ? "assert" : "clear", jiffies);
      }
      
     @@ drivers/pps/clients/pps-ldisc.c: static int pps_tty_open(struct tty_struct *tty)
    @@ drivers/pps/pps.c: EXPORT_SYMBOL(pps_lookup_dev);
      {
     -	int err;
     -
    - 	pps_class = class_create("pps");
    + 	pps_class = class_create(THIS_MODULE, "pps");
      	if (IS_ERR(pps_class)) {
      		pr_err("failed to allocate class\n");
     @@ drivers/pps/pps.c: static int __init pps_init(void)
    @@ drivers/ptp/ptp_ocp.c: ptp_ocp_complete(struct ptp_ocp *bp)
     -		ptp_ocp_symlink(bp, pps->dev, "pps");
     +		ptp_ocp_symlink(bp, &pps->dev, "pps");
      
    - 	ptp_ocp_debugfs_add_device(bp);
    - 
    + 	if (device_add_groups(&bp->dev, timecard_groups))
    + 		pr_err("device add groups failed\n");
     
      ## include/linux/pps_kernel.h ##
     @@ include/linux/pps_kernel.h: struct pps_device {
---

Results of testing on various branches:

| Branch                    | Patch Apply | Build Test |
|---------------------------|-------------|------------|
| stable/linux-5.15.y       |  Success    |  Failed    |

Build Errors:
Build error for stable/linux-5.15.y:
    ssh: connect to host 192.168.1.58 port 22: No route to host




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux