diff options
-rw-r--r-- | 0015-ptp-free-ptp-device-pin-descriptors-properly.patch | 50 | ||||
-rw-r--r-- | PKGBUILD | 7 |
2 files changed, 2 insertions, 55 deletions
diff --git a/0015-ptp-free-ptp-device-pin-descriptors-properly.patch b/0015-ptp-free-ptp-device-pin-descriptors-properly.patch deleted file mode 100644 index 6298fa4..0000000 --- a/0015-ptp-free-ptp-device-pin-descriptors-properly.patch +++ /dev/null @@ -1,50 +0,0 @@ -From b89e9f6a3ec61a96b5abced31813ad043bda3827 Mon Sep 17 00:00:00 2001 -From: Vladis Dronov <vdronov@redhat.com> -Date: Mon, 13 Jan 2020 14:00:09 +0100 -Subject: [PATCH 15/16] ptp: free ptp device pin descriptors properly - -There is a bug in ptp_clock_unregister(), where ptp_cleanup_pin_groups() -first frees ptp->pin_{,dev_}attr, but then posix_clock_unregister() needs -them to destroy a related sysfs device. - -These functions can not be just swapped, as posix_clock_unregister() frees -ptp which is needed in the ptp_cleanup_pin_groups(). Fix this by calling -ptp_cleanup_pin_groups() in ptp_clock_release(), right before ptp is freed. - -This makes this patch fix an UAF bug in a patch which fixes an UAF bug. - -Reported-by: Antti Laakso <antti.laakso@intel.com> -Fixes: a33121e5487b ("ptp: fix the race between the release of ptp_clock and cdev") -Link: https://lore.kernel.org/netdev/3d2bd09735dbdaf003585ca376b7c1e5b69a19bd.camel@intel.com/ -Signed-off-by: Vladis Dronov <vdronov@redhat.com> -Acked-by: Richard Cochran <richardcochran@gmail.com> ---- - drivers/ptp/ptp_clock.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/drivers/ptp/ptp_clock.c b/drivers/ptp/ptp_clock.c -index 61fafe0374ce..b84f16bbd6f2 100644 ---- a/drivers/ptp/ptp_clock.c -+++ b/drivers/ptp/ptp_clock.c -@@ -170,6 +170,7 @@ static void ptp_clock_release(struct device *dev) - { - struct ptp_clock *ptp = container_of(dev, struct ptp_clock, dev); - -+ ptp_cleanup_pin_groups(ptp); - mutex_destroy(&ptp->tsevq_mux); - mutex_destroy(&ptp->pincfg_mux); - ida_simple_remove(&ptp_clocks_map, ptp->index); -@@ -302,9 +303,8 @@ int ptp_clock_unregister(struct ptp_clock *ptp) - if (ptp->pps_source) - pps_unregister_source(ptp->pps_source); - -- ptp_cleanup_pin_groups(ptp); -- - posix_clock_unregister(&ptp->clock); -+ - return 0; - } - EXPORT_SYMBOL(ptp_clock_unregister); --- -2.25.0 - @@ -17,7 +17,7 @@ pkgbase=linux-ck _supver=5 _majver=4 -_minver=13 +_minver=14 _gccpatchver='20190822' _ckpatchversion=ck1 if [ "$_minver" == "0" ]; then @@ -53,7 +53,6 @@ source=( 0012-Revert-iwlwifi-mvm-fix-scan-config-command-size.patch 0013-e1000e-Revert-e1000e-Make-watchdog-use-delayed-work.patch 0014-drm-amdgpu-Add-DC-feature-mask-to-disable-fractional.patch - 0015-ptp-free-ptp-device-pin-descriptors-properly.patch linux-ck-patch-${_supver}.${_majver}-${_ckpatchversion}.xz::http://ck.kolivas.org/patches/${_supver}.0/${_supver}.${_majver}/${_supver}.${_majver}-${_ckpatchversion}/patch-${_supver}.${_majver}-${_ckpatchversion}.xz graysky_bdver2-hotfix.patch kernel_gcc_patch-${_gccpatchver}.tar.gz::https://github.com/graysky2/kernel_gcc_patch/archive/${_gccpatchver}.tar.gz @@ -66,7 +65,7 @@ validpgpkeys=( '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman ) # https://www.kernel.org/pub/linux/kernel/v5.x/sha256sums.asc -b2sums=('d610a2bf375c9147b26d6e314c1e86b9f32453572c1e8a859be3ac5fa42d7ba647334ef76a92a7e1e61f78fa256692bec3d62003589017840a37947d9d5b1de0' +b2sums=('eb0286a193b29754562771905db13e6d2140dc577d88be8e8f91f0ab77b9adbe915bb74e89e10e5dce3763f3efce6204c973f5d3341dba9e11ecb544500be5a3' 'SKIP' '76c34ea8f8d6fafcbb12fa0e01821af5926e60046c37cee9855786b8bfe16b8ac5222d441335aa01b62e7ebfe2805a1175d00d3bc4ee1c2617173934284c4164' '5427a9283a9ccb38a63ba5bd680e331245bd134501ce66e912cb07c250e37810a895f4ae78371db2b0cfcbfcb1bee96daafc0e5c71f40ec9b8643d3a88a80bab' @@ -82,7 +81,6 @@ b2sums=('d610a2bf375c9147b26d6e314c1e86b9f32453572c1e8a859be3ac5fa42d7ba647334ef 'd4878831fa03c17b590001d15ddbbfeb1a8747c961503c26aee330d213c0fbf6c2eab7226456083f52a5fb4b4ffd9bf7b2db741de7c7476a15873f2a8d9f7b74' '76bb50a23b822de85f3381a511b42bb46110a39d31ede81bd168cb708882b93be525576b1805da5383f35f6f18fab817ad195aa870ab75e7775855a150d172a1' '726d89aeb1f5df51cfa395e01edb4b8b36460b1f75611ee921d057dfb28cd2d6c41990bca4b40512b9398e0558c4028845252442d9ec1d8f13847a0ed9903a1d' - '00cfbcf17b5f89a0d69f46ea9487088b49b265d360612a777394c69746e13618aff56240dae754111db901891641925b83a8bb95c85c3ee0c11266611d72145c' '8faff0d2b95eda0b96e8042367634c45c1e823238e99793daeda5614efdc448dfe28172bf13f0d988cf4d5cbb4892089893e0183cd8825de7f54942283f2b5a0' '1892bd22775eac3bcc4d37f4fd30c95346bf3a0888cbbff57fd614973b525390dff2e315ce35b2e498523cceaab94ff21a80475dee8df3de4dd8fc0fab07d74e' '0b11c09e01a7480466d5237a8792c941c9af3e8d6584ffd84285cd9569f5355c10879566ce5846ef9263535020c53e1aa6c58100a571b537ccb7f2431baf7996' @@ -120,7 +118,6 @@ prepare() { patch -p1 -i ../0012-Revert-iwlwifi-mvm-fix-scan-config-command-size.patch patch -p1 -i ../0013-e1000e-Revert-e1000e-Make-watchdog-use-delayed-work.patch patch -p1 -i ../0014-drm-amdgpu-Add-DC-feature-mask-to-disable-fractional.patch - patch -p1 -i ../0015-ptp-free-ptp-device-pin-descriptors-properly.patch # fix naming schema in EXTRAVERSION of ck patch set |