提交 ef283688 编写于 作者: K Kees Cook 提交者: Martin Schwidefsky

s390: avoid format strings leaking into names

This makes sure format strings can't accidentally leak into kernel
interface names.
Signed-off-by: NKees Cook <keescook@chromium.org>
Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
上级 0eb69a0c
...@@ -593,7 +593,7 @@ dcssblk_add_store(struct device *dev, struct device_attribute *attr, const char ...@@ -593,7 +593,7 @@ dcssblk_add_store(struct device *dev, struct device_attribute *attr, const char
dev_info->start = dcssblk_find_lowest_addr(dev_info); dev_info->start = dcssblk_find_lowest_addr(dev_info);
dev_info->end = dcssblk_find_highest_addr(dev_info); dev_info->end = dcssblk_find_highest_addr(dev_info);
dev_set_name(&dev_info->dev, dev_info->segment_name); dev_set_name(&dev_info->dev, "%s", dev_info->segment_name);
dev_info->dev.release = dcssblk_release_segment; dev_info->dev.release = dcssblk_release_segment;
dev_info->dev.groups = dcssblk_dev_attr_groups; dev_info->dev.groups = dcssblk_dev_attr_groups;
INIT_LIST_HEAD(&dev_info->lh); INIT_LIST_HEAD(&dev_info->lh);
......
...@@ -761,7 +761,7 @@ static int vmlogrdr_register_device(struct vmlogrdr_priv_t *priv) ...@@ -761,7 +761,7 @@ static int vmlogrdr_register_device(struct vmlogrdr_priv_t *priv)
dev = kzalloc(sizeof(struct device), GFP_KERNEL); dev = kzalloc(sizeof(struct device), GFP_KERNEL);
if (dev) { if (dev) {
dev_set_name(dev, priv->internal_name); dev_set_name(dev, "%s", priv->internal_name);
dev->bus = &iucv_bus; dev->bus = &iucv_bus;
dev->parent = iucv_root; dev->parent = iucv_root;
dev->driver = &vmlogrdr_driver; dev->driver = &vmlogrdr_driver;
......
...@@ -356,7 +356,7 @@ struct zcrypt_ops *zcrypt_msgtype_request(unsigned char *name, int variant) ...@@ -356,7 +356,7 @@ struct zcrypt_ops *zcrypt_msgtype_request(unsigned char *name, int variant)
zops = __ops_lookup(name, variant); zops = __ops_lookup(name, variant);
if (!zops) { if (!zops) {
request_module(name); request_module("%s", name);
zops = __ops_lookup(name, variant); zops = __ops_lookup(name, variant);
} }
if ((!zops) || (!try_module_get(zops->owner))) if ((!zops) || (!try_module_get(zops->owner)))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册