linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Slaby <jslaby@suse.cz>
To: stable@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
	Russell King <rmk+kernel@armlinux.org.uk>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	Jiri Slaby <jslaby@suse.cz>
Subject: [PATCH 3.12 002/113] crypto: caam - fix non-hmac hashes
Date: Mon,  6 Mar 2017 10:10:26 +0100	[thread overview]
Message-ID: <1ce811419e4b9031178baf8124d9578fa72702a8.1488791430.git.jslaby@suse.cz> (raw)
In-Reply-To: <f2eabff3e55665a6e2cc3819ad3f407c151b8a7d.1488791430.git.jslaby@suse.cz>
In-Reply-To: <cover.1488791430.git.jslaby@suse.cz>

From: Russell King <rmk+kernel@armlinux.org.uk>

3.12-stable review patch.  If anyone has any objections, please let me know.

===============

commit a0118c8b2be9297aed8e915c60b4013326b256d4 upstream.

Since 6de62f15b581 ("crypto: algif_hash - Require setkey before
accept(2)"), the AF_ALG interface requires userspace to provide a key
to any algorithm that has a setkey method.  However, the non-HMAC
algorithms are not keyed, so setting a key is unnecessary.

Fix this by removing the setkey method from the non-keyed hash
algorithms.

Fixes: 6de62f15b581 ("crypto: algif_hash - Require setkey before accept(2)")
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 drivers/crypto/caam/caamhash.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/crypto/caam/caamhash.c b/drivers/crypto/caam/caamhash.c
index 92d2116bf1ad..170df51257ea 100644
--- a/drivers/crypto/caam/caamhash.c
+++ b/drivers/crypto/caam/caamhash.c
@@ -1799,6 +1799,7 @@ caam_hash_alloc(struct device *ctrldev, struct caam_hash_template *template,
 			 template->name);
 		snprintf(alg->cra_driver_name, CRYPTO_MAX_ALG_NAME, "%s",
 			 template->driver_name);
+		t_alg->ahash_alg.setkey = NULL;
 	}
 	alg->cra_module = THIS_MODULE;
 	alg->cra_init = caam_hash_cra_init;
-- 
2.12.0

  parent reply	other threads:[~2017-03-06  9:42 UTC|newest]

Thread overview: 117+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-06  9:11 [PATCH 3.12 000/113] 3.12.71-stable review Jiri Slaby
2017-03-06  9:10 ` [PATCH 3.12 001/113] x86/Kconfig: Simplify X86_IO_APIC dependencies Jiri Slaby
2017-03-06  9:10 ` Jiri Slaby [this message]
2017-03-06  9:10 ` [PATCH 3.12 003/113] net: possible use after free in dst_release Jiri Slaby
2017-03-06  9:10 ` [PATCH 3.12 004/113] fbdev: color map copying bounds checking Jiri Slaby
2017-03-06  9:10 ` [PATCH 3.12 005/113] tile/ptrace: Preserve previous registers for short regset write Jiri Slaby
2017-03-06  9:10 ` [PATCH 3.12 006/113] sysctl: fix proc_doulongvec_ms_jiffies_minmax() Jiri Slaby
2017-03-06  9:10 ` [PATCH 3.12 007/113] ISDN: eicon: silence misleading array-bounds warning Jiri Slaby
2017-03-06  9:10 ` [PATCH 3.12 008/113] can: c_can_pci: fix null-pointer-deref in c_can_start() - set device pointer Jiri Slaby
2017-03-06  9:10 ` [PATCH 3.12 009/113] can: ti_hecc: add missing prepare and unprepare of the clock Jiri Slaby
2017-03-06  9:10 ` [PATCH 3.12 010/113] ARC: [arcompact] handle unaligned access delay slot corner case Jiri Slaby
2017-03-06  9:10 ` [PATCH 3.12 011/113] parisc: Don't use BITS_PER_LONG in userspace-exported swab.h header Jiri Slaby
2017-03-06  9:10 ` [PATCH 3.12 012/113] nfs: Don't increment lock sequence ID after NFS4ERR_MOVED Jiri Slaby
2017-03-06  9:10 ` [PATCH 3.12 013/113] SUNRPC: cleanup ida information when removing sunrpc module Jiri Slaby
2017-03-06  9:10 ` [PATCH 3.12 014/113] drm/i915: Don't leak edid in intel_crt_detect_ddc() Jiri Slaby
2017-03-06  9:10 ` [PATCH 3.12 015/113] s5k4ecgx: select CRC32 helper Jiri Slaby
2017-03-06  9:10 ` [PATCH 3.12 016/113] platform/x86: intel_mid_powerbtn: Set IRQ_ONESHOT Jiri Slaby
2017-03-06  9:10 ` [PATCH 3.12 017/113] net: fix harmonize_features() vs NETIF_F_HIGHDMA Jiri Slaby
2017-03-06  9:10 ` [PATCH 3.12 018/113] ipv6: addrconf: Avoid addrconf_disable_change() using RCU read-side lock Jiri Slaby
2017-03-06  9:10 ` [PATCH 3.12 019/113] tcp: initialize max window for a new fastopen socket Jiri Slaby
2017-03-06  9:10 ` [PATCH 3.12 020/113] af_unix: move unix_mknod() out of bindlock Jiri Slaby
2017-03-06  9:10 ` [PATCH 3.12 021/113] qmi_wwan/cdc_ether: add device ID for HP lt2523 (Novatel E371) WWAN card Jiri Slaby
2017-03-06  9:10 ` [PATCH 3.12 022/113] USB: serial: option: add WeTelecom WM-D200 Jiri Slaby
2017-03-06  9:10 ` [PATCH 3.12 023/113] USB: serial: option: add WeTelecom 0x6802 and 0x6803 products Jiri Slaby
2017-03-06  9:10 ` [PATCH 3.12 024/113] USB: serial: option: add more ZTE device ids Jiri Slaby
2017-03-06  9:10 ` [PATCH 3.12 025/113] USB: serial: option: add even " Jiri Slaby
2017-03-06  9:10 ` [PATCH 3.12 026/113] drm/nouveau/nv1a,nv1f/disp: fix memory clock rate retrieval Jiri Slaby
2017-03-06  9:10 ` [PATCH 3.12 027/113] crypto: api - Clear CRYPTO_ALG_DEAD bit before registering an alg Jiri Slaby
2017-03-06  9:10 ` [PATCH 3.12 028/113] ata: sata_mv:- Handle return value of devm_ioremap Jiri Slaby
2017-03-06  9:10 ` [PATCH 3.12 029/113] svcrpc: fix oops in absence of krb5 module Jiri Slaby
2017-03-06  9:10 ` [PATCH 3.12 030/113] cifs: initialize file_info_lock Jiri Slaby
2017-03-06  9:10 ` [PATCH 3.12 031/113] mm/memory_hotplug.c: check start_pfn in test_pages_in_a_zone() Jiri Slaby
2017-03-06  9:10 ` [PATCH 3.12 032/113] mm, fs: check for fatal signals in do_generic_file_read() Jiri Slaby
2017-03-06  9:10 ` [PATCH 3.12 033/113] can: bcm: fix hrtimer/tasklet termination in bcm op removal Jiri Slaby
2017-03-06  9:10 ` [PATCH 3.12 034/113] USB: serial: qcserial: add Dell DW5570 QDL Jiri Slaby
2017-03-06  9:10 ` [PATCH 3.12 035/113] USB: serial: pl2303: add ATEN device ID Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 036/113] USB: Add quirk for WORLDE easykey.25 MIDI keyboard Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 037/113] USB: serial: option: add device ID for HP lt2523 (Novatel E371) Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 038/113] ARC: [arcompact] brown paper bag bug in unaligned access delay slot fixup Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 039/113] selinux: fix off-by-one in setprocattr Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 040/113] ARM: 8643/3: arm/ptrace: Preserve previous registers for short regset write Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 041/113] target: Fix COMPARE_AND_WRITE ref leak for non GOOD status Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 042/113] mac80211: Fix adding of mesh vendor IEs Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 043/113] scsi: zfcp: fix use-after-free by not tracing WKA port open/close on failed send Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 044/113] ALSA: seq: Fix race at creating a queue Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 045/113] ALSA: seq: Don't handle loop timeout at snd_seq_pool_done() Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 046/113] drm/i915: fix use-after-free in page_flip_completed() Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 047/113] sched/debug: Don't dump sched debug info in SysRq-W Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 048/113] tun: Fix TUN_PKT_STRIP setting Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 049/113] can: Fix kernel panic at security_sock_rcv_skb Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 050/113] ipv6: fix ip6_tnl_parse_tlv_enc_lim() Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 051/113] ipv6: pointer math error in ip6_tnl_parse_tlv_enc_lim() Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 052/113] tcp: fix 0 divide in __tcp_select_window() Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 053/113] net: use a work queue to defer net_disable_timestamp() work Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 054/113] ipv4: keep skb->dst around in presence of IP options Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 055/113] netlabel: out of bound access in cipso_v4_validate() Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 056/113] ip6_gre: fix ip6gre_err() invalid reads Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 057/113] tcp: avoid infinite loop in tcp_splice_read() Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 058/113] tun: read vnet_hdr_sz once Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 059/113] macvtap: read vnet_hdr_size once Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 060/113] sctp: avoid BUG_ON on sctp_wait_for_sndbuf Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 061/113] packet: round up linear to header len Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 062/113] ping: fix a null pointer dereference Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 063/113] l2tp: do not use udp_ioctl() Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 064/113] scsi: move the nr_phys_segments assert into scsi_init_io Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 065/113] vfs: fix uninitialized flags in splice_to_pipe() Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 066/113] siano: make it work again with CONFIG_VMAP_STACK Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 067/113] scsi: don't BUG_ON() empty DMA transfers Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 068/113] futex: Move futex_init() to core_initcall Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 069/113] printk: use rcuidle console tracepoint Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 070/113] rtc: interface: ignore expired timers when enqueuing new timers Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 071/113] net/llc: avoid BUG_ON() in skb_orphan() Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 072/113] packet: fix races in fanout_add() Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 073/113] packet: Do not call fanout_release from atomic contexts Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 074/113] dccp: fix freeing skb too early for IPV6_RECVPKTINFO Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 075/113] irda: Fix lockdep annotations in hashbin_delete() Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 076/113] net: socket: fix recvmmsg not returning error from sock_error Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 077/113] tty: serial: msm: Fix module autoload Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 078/113] USB: serial: mos7840: fix another NULL-deref at open Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 079/113] USB: serial: cp210x: add new IDs for GE Bx50v3 boards Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 080/113] USB: serial: ftdi_sio: fix modem-status error handling Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 081/113] USB: serial: ftdi_sio: fix extreme low-latency setting Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 082/113] USB: serial: ftdi_sio: fix line-status over-reporting Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 083/113] USB: serial: spcp8x5: fix modem-status handling Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 084/113] USB: serial: opticon: fix CTS retrieval at open Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 085/113] USB: serial: ark3116: fix register-accessor error handling Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 086/113] x86/platform/goldfish: Prevent unconditional loading Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 087/113] goldfish: Sanitize the broken interrupt handler Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 088/113] rtlwifi: rtl_usb: Fix for URB leaking when doing ifconfig up/down Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 089/113] af_packet: remove a stray tab in packet_set_ring() Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 090/113] ext4: validate s_first_meta_bg at mount time Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 091/113] ext4: fix fencepost in s_first_meta_bg validation Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 092/113] ocfs2: do not write error flag to user structure we cannot copy from/to Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 093/113] 6lowpan: release device on error path Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 094/113] mfd: pm8921: Potential NULL dereference in pm8921_remove() Jiri Slaby
2017-03-06  9:11 ` [PATCH 3.12 095/113] Staging: vt6655-6: potential NULL dereference in hostap_disable_hostapd() Jiri Slaby
2017-03-06  9:12 ` [PATCH 3.12 096/113] drm/nv50/disp: min/max are reversed in nv50_crtc_gamma_set() Jiri Slaby
2017-03-06  9:12 ` [PATCH 3.12 097/113] cpufreq: fix garbage kobjects on errors during suspend/resume Jiri Slaby
2017-03-06  9:12 ` [PATCH 3.12 098/113] cpufreq: remove sysfs files for CPUs which failed to come back after resume Jiri Slaby
2017-03-06  9:12 ` [PATCH 3.12 099/113] cpufreq: Clean up after a failing light-weight initialization Jiri Slaby
2017-03-06  9:12 ` [PATCH 3.12 100/113] cpufreq: preserve user_policy across suspend/resume Jiri Slaby
2017-03-06  9:12 ` [PATCH 3.12 101/113] ipv6: fix the use of pcpu_tstats in ip6_tunnel Jiri Slaby
2017-03-06  9:12 ` [PATCH 3.12 102/113] net: 6lowpan: fix lowpan_header_create non-compression memcpy call Jiri Slaby
2017-03-06  9:12 ` [PATCH 3.12 103/113] ipv6: simplify detection of first operational link-local address on interface Jiri Slaby
2017-03-06  9:12 ` [PATCH 3.12 104/113] net: sctp: rework multihoming retransmission path selection to rfc4960 Jiri Slaby
2017-03-06  9:12 ` [PATCH 3.12 105/113] vti4: Don't count header length twice Jiri Slaby
2017-03-06  9:12 ` [PATCH 3.12 106/113] PCI: mvebu: Use max_t() instead of max(resource_size_t,) Jiri Slaby
2017-03-06  9:12 ` [PATCH 3.12 107/113] PCI: mvebu: split PCIe BARs into multiple MBus windows when needed Jiri Slaby
2017-03-06  9:12 ` [PATCH 3.12 108/113] gianfar: Check if phydev present on ethtool -A Jiri Slaby
2017-03-06  9:12 ` [PATCH 3.12 109/113] net: filter: x86: fix JIT address randomization Jiri Slaby
2017-03-06  9:12 ` [PATCH 3.12 110/113] net: filter: s390: " Jiri Slaby
2017-03-06  9:12 ` [PATCH 3.12 111/113] USB: cdc-acm: fix double usb_autopm_put_interface() in acm_port_activate() Jiri Slaby
2017-03-06  9:12 ` [PATCH 3.12 112/113] USB: cdc-acm: fix open and suspend race Jiri Slaby
2017-03-06  9:12 ` [PATCH 3.12 113/113] USB: cdc-acm: fix failed open not being detected Jiri Slaby
2017-03-06 14:38 ` [PATCH 3.12 000/113] 3.12.71-stable review Guenter Roeck
2017-03-09 19:53   ` Jiri Slaby
2017-03-06 18:03 ` Shuah Khan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1ce811419e4b9031178baf8124d9578fa72702a8.1488791430.git.jslaby@suse.cz \
    --to=jslaby@suse.cz \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk+kernel@armlinux.org.uk \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).