CVE ID
stringlengths 13
43
⌀ | CVE Page
stringlengths 45
48
⌀ | CWE ID
stringclasses 90
values | codeLink
stringlengths 46
139
| commit_id
stringlengths 6
81
| commit_message
stringlengths 3
13.3k
⌀ | func_after
stringlengths 14
241k
| func_before
stringlengths 14
241k
| lang
stringclasses 3
values | project
stringclasses 309
values | vul
int8 0
1
|
---|---|---|---|---|---|---|---|---|---|---|
CVE-2014-3171
|
https://www.cvedetails.com/cve/CVE-2014-3171/
| null |
https://github.com/chromium/chromium/commit/d10a8dac48d3a9467e81c62cb45208344f4542db
|
d10a8dac48d3a9467e81c62cb45208344f4542db
|
Replace further questionable HashMap::add usages in bindings
BUG=390928
[email protected]
Review URL: https://codereview.chromium.org/411273002
git-svn-id: svn://svn.chromium.org/blink/trunk@178823 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
bool readTag(SerializationTag* tag)
{
if (m_position >= m_length)
return false;
*tag = static_cast<SerializationTag>(m_buffer[m_position++]);
return true;
}
|
bool readTag(SerializationTag* tag)
{
if (m_position >= m_length)
return false;
*tag = static_cast<SerializationTag>(m_buffer[m_position++]);
return true;
}
|
C
|
Chrome
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/0b53a1df69a39e0663c9e4d651de402fc3d1d10a
|
0b53a1df69a39e0663c9e4d651de402fc3d1d10a
|
Turn on SyncedNotifications for Dev, Canary, and Unknown channel
Turning it on in Dev and Canary will allow us to gather feedback during the development process.
BUG=22205
Review URL: https://chromiumcodereview.appspot.com/12617010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@190089 0039d316-1c4b-4281-b951-d872f2087c98
|
virtual void SetUp() {
profile_.reset(new TestingProfile());
base::FilePath program_path(FILE_PATH_LITERAL("chrome.exe"));
command_line_.reset(new CommandLine(program_path));
}
|
virtual void SetUp() {
profile_.reset(new TestingProfile());
base::FilePath program_path(FILE_PATH_LITERAL("chrome.exe"));
command_line_.reset(new CommandLine(program_path));
}
|
C
|
Chrome
| 0 |
CVE-2019-13106
|
https://www.cvedetails.com/cve/CVE-2019-13106/
|
CWE-787
|
https://github.com/u-boot/u-boot/commits/master
|
master
|
Merge branch '2020-01-22-master-imports'
- Re-add U8500 platform support
- Add bcm968360bg support
- Assorted Keymile fixes
- Other assorted bugfixes
|
int qrio_get_gpio(u8 port_off, u8 gpio_nr)
{
u32 gprt;
void __iomem *qrio_base = (void *)CONFIG_SYS_QRIO_BASE;
gprt = in_be32(qrio_base + port_off + GPRT_OFF);
return (gprt >> gpio_nr) & 1U;
}
|
int qrio_get_gpio(u8 port_off, u8 gpio_nr)
{
u32 gprt;
void __iomem *qrio_base = (void *)CONFIG_SYS_QRIO_BASE;
gprt = in_be32(qrio_base + port_off + GPRT_OFF);
return (gprt >> gpio_nr) & 1U;
}
|
C
|
u-boot
| 0 |
CVE-2013-0886
|
https://www.cvedetails.com/cve/CVE-2013-0886/
| null |
https://github.com/chromium/chromium/commit/18d67244984a574ba2dd8779faabc0e3e34f4b76
|
18d67244984a574ba2dd8779faabc0e3e34f4b76
|
Implement TextureImageTransportSurface using texture mailbox
This has a couple of advantages:
- allow tearing down and recreating the UI parent context without
losing the renderer contexts
- do not require a context to be able to generate textures when
creating the GLSurfaceHandle
- clearer ownership semantics that potentially allows for more
robust and easier lost context handling/thumbnailing/etc., since a texture is at
any given time owned by either: UI parent, mailbox, or
TextureImageTransportSurface
- simplify frontbuffer protection logic;
the frontbuffer textures are now owned by RWHV where they are refcounted
The TextureImageTransportSurface informs RenderWidgetHostView of the
mailbox names for the front- and backbuffer textures by
associating them with a surface_handle (1 or 2) in the AcceleratedSurfaceNew message.
During SwapBuffers() or PostSubBuffer() cycles, it then uses
produceTextureCHROMIUM() and consumeTextureCHROMIUM()
to transfer ownership between renderer and browser compositor.
RWHV sends back the surface_handle of the buffer being returned with the Swap ACK
(or 0 if no buffer is being returned in which case TextureImageTransportSurface will
allocate a new texture - note that this could be used to
simply keep textures for thumbnailing).
BUG=154815,139616
[email protected]
Review URL: https://chromiumcodereview.appspot.com/11194042
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171569 0039d316-1c4b-4281-b951-d872f2087c98
|
static gboolean OnRealize(GtkWidget* widget,
RenderWidgetHostViewGtk* host_view) {
host_view->signals_.Connect(gtk_widget_get_toplevel(widget),
"configure-event",
G_CALLBACK(OnConfigureEvent), host_view);
return FALSE;
}
|
static gboolean OnRealize(GtkWidget* widget,
RenderWidgetHostViewGtk* host_view) {
host_view->signals_.Connect(gtk_widget_get_toplevel(widget),
"configure-event",
G_CALLBACK(OnConfigureEvent), host_view);
return FALSE;
}
|
C
|
Chrome
| 0 |
CVE-2011-2790
|
https://www.cvedetails.com/cve/CVE-2011-2790/
|
CWE-399
|
https://github.com/chromium/chromium/commit/adb3498ca0b69561d8c6b60bab641de4b0e37dbf
|
adb3498ca0b69561d8c6b60bab641de4b0e37dbf
|
Reviewed by Kevin Ollivier.
[wx] Fix strokeArc and fillRoundedRect drawing, and add clipPath support.
https://bugs.webkit.org/show_bug.cgi?id=60847
git-svn-id: svn://svn.chromium.org/blink/trunk@86502 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
void GraphicsContext::fillPath(const Path& path)
{
#if USE(WXGC)
wxGraphicsContext* gc = m_data->context->GetGraphicsContext();
if (gc)
gc->FillPath(*path.platformPath());
#endif
}
|
void GraphicsContext::fillPath(const Path& path)
{
#if USE(WXGC)
wxGraphicsContext* gc = m_data->context->GetGraphicsContext();
if (gc)
gc->FillPath(*path.platformPath());
#endif
}
|
C
|
Chrome
| 0 |
CVE-2013-2017
|
https://www.cvedetails.com/cve/CVE-2013-2017/
|
CWE-399
|
https://github.com/torvalds/linux/commit/6ec82562ffc6f297d0de36d65776cff8e5704867
|
6ec82562ffc6f297d0de36d65776cff8e5704867
|
veth: Dont kfree_skb() after dev_forward_skb()
In case of congestion, netif_rx() frees the skb, so we must assume
dev_forward_skb() also consume skb.
Bug introduced by commit 445409602c092
(veth: move loopback logic to common location)
We must change dev_forward_skb() to always consume skb, and veth to not
double free it.
Bug report : http://marc.info/?l=linux-netdev&m=127310770900442&w=3
Reported-by: Martín Ferrari <[email protected]>
Signed-off-by: Eric Dumazet <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
int init_dummy_netdev(struct net_device *dev)
{
/* Clear everything. Note we don't initialize spinlocks
* are they aren't supposed to be taken by any of the
* NAPI code and this dummy netdev is supposed to be
* only ever used for NAPI polls
*/
memset(dev, 0, sizeof(struct net_device));
/* make sure we BUG if trying to hit standard
* register/unregister code path
*/
dev->reg_state = NETREG_DUMMY;
/* initialize the ref count */
atomic_set(&dev->refcnt, 1);
/* NAPI wants this */
INIT_LIST_HEAD(&dev->napi_list);
/* a dummy interface is started by default */
set_bit(__LINK_STATE_PRESENT, &dev->state);
set_bit(__LINK_STATE_START, &dev->state);
return 0;
}
|
int init_dummy_netdev(struct net_device *dev)
{
/* Clear everything. Note we don't initialize spinlocks
* are they aren't supposed to be taken by any of the
* NAPI code and this dummy netdev is supposed to be
* only ever used for NAPI polls
*/
memset(dev, 0, sizeof(struct net_device));
/* make sure we BUG if trying to hit standard
* register/unregister code path
*/
dev->reg_state = NETREG_DUMMY;
/* initialize the ref count */
atomic_set(&dev->refcnt, 1);
/* NAPI wants this */
INIT_LIST_HEAD(&dev->napi_list);
/* a dummy interface is started by default */
set_bit(__LINK_STATE_PRESENT, &dev->state);
set_bit(__LINK_STATE_START, &dev->state);
return 0;
}
|
C
|
linux
| 0 |
CVE-2014-0203
|
https://www.cvedetails.com/cve/CVE-2014-0203/
|
CWE-20
|
https://github.com/torvalds/linux/commit/86acdca1b63e6890540fa19495cfc708beff3d8b
|
86acdca1b63e6890540fa19495cfc708beff3d8b
|
fix autofs/afs/etc. magic mountpoint breakage
We end up trying to kfree() nd.last.name on open("/mnt/tmp", O_CREAT)
if /mnt/tmp is an autofs direct mount. The reason is that nd.last_type
is bogus here; we want LAST_BIND for everything of that kind and we
get LAST_NORM left over from finding parent directory.
So make sure that it *is* set properly; set to LAST_BIND before
doing ->follow_link() - for normal symlinks it will be changed
by __vfs_follow_link() and everything else needs it set that way.
Signed-off-by: Al Viro <[email protected]>
|
struct file *do_filp_open(int dfd, const char *pathname,
int open_flag, int mode, int acc_mode)
{
struct file *filp;
struct nameidata nd;
int error;
struct path path, save;
struct dentry *dir;
int count = 0;
int will_truncate;
int flag = open_to_namei_flags(open_flag);
/*
* O_SYNC is implemented as __O_SYNC|O_DSYNC. As many places only
* check for O_DSYNC if the need any syncing at all we enforce it's
* always set instead of having to deal with possibly weird behaviour
* for malicious applications setting only __O_SYNC.
*/
if (open_flag & __O_SYNC)
open_flag |= O_DSYNC;
if (!acc_mode)
acc_mode = MAY_OPEN | ACC_MODE(flag);
/* O_TRUNC implies we need access checks for write permissions */
if (flag & O_TRUNC)
acc_mode |= MAY_WRITE;
/* Allow the LSM permission hook to distinguish append
access from general write access. */
if (flag & O_APPEND)
acc_mode |= MAY_APPEND;
/*
* The simplest case - just a plain lookup.
*/
if (!(flag & O_CREAT)) {
filp = get_empty_filp();
if (filp == NULL)
return ERR_PTR(-ENFILE);
nd.intent.open.file = filp;
filp->f_flags = open_flag;
nd.intent.open.flags = flag;
nd.intent.open.create_mode = 0;
error = do_path_lookup(dfd, pathname,
lookup_flags(flag)|LOOKUP_OPEN, &nd);
if (IS_ERR(nd.intent.open.file)) {
if (error == 0) {
error = PTR_ERR(nd.intent.open.file);
path_put(&nd.path);
}
} else if (error)
release_open_intent(&nd);
if (error)
return ERR_PTR(error);
goto ok;
}
/*
* Create - we need to know the parent.
*/
error = path_init(dfd, pathname, LOOKUP_PARENT, &nd);
if (error)
return ERR_PTR(error);
error = path_walk(pathname, &nd);
if (error) {
if (nd.root.mnt)
path_put(&nd.root);
return ERR_PTR(error);
}
if (unlikely(!audit_dummy_context()))
audit_inode(pathname, nd.path.dentry);
/*
* We have the parent and last component. First of all, check
* that we are not asked to creat(2) an obvious directory - that
* will not do.
*/
error = -EISDIR;
if (nd.last_type != LAST_NORM || nd.last.name[nd.last.len])
goto exit_parent;
error = -ENFILE;
filp = get_empty_filp();
if (filp == NULL)
goto exit_parent;
nd.intent.open.file = filp;
filp->f_flags = open_flag;
nd.intent.open.flags = flag;
nd.intent.open.create_mode = mode;
dir = nd.path.dentry;
nd.flags &= ~LOOKUP_PARENT;
nd.flags |= LOOKUP_CREATE | LOOKUP_OPEN;
if (flag & O_EXCL)
nd.flags |= LOOKUP_EXCL;
mutex_lock(&dir->d_inode->i_mutex);
path.dentry = lookup_hash(&nd);
path.mnt = nd.path.mnt;
do_last:
error = PTR_ERR(path.dentry);
if (IS_ERR(path.dentry)) {
mutex_unlock(&dir->d_inode->i_mutex);
goto exit;
}
if (IS_ERR(nd.intent.open.file)) {
error = PTR_ERR(nd.intent.open.file);
goto exit_mutex_unlock;
}
/* Negative dentry, just create the file */
if (!path.dentry->d_inode) {
/*
* This write is needed to ensure that a
* ro->rw transition does not occur between
* the time when the file is created and when
* a permanent write count is taken through
* the 'struct file' in nameidata_to_filp().
*/
error = mnt_want_write(nd.path.mnt);
if (error)
goto exit_mutex_unlock;
error = __open_namei_create(&nd, &path, flag, mode);
if (error) {
mnt_drop_write(nd.path.mnt);
goto exit;
}
filp = nameidata_to_filp(&nd);
mnt_drop_write(nd.path.mnt);
if (nd.root.mnt)
path_put(&nd.root);
if (!IS_ERR(filp)) {
error = ima_path_check(&filp->f_path, filp->f_mode &
(MAY_READ | MAY_WRITE | MAY_EXEC));
if (error) {
fput(filp);
filp = ERR_PTR(error);
}
}
return filp;
}
/*
* It already exists.
*/
mutex_unlock(&dir->d_inode->i_mutex);
audit_inode(pathname, path.dentry);
error = -EEXIST;
if (flag & O_EXCL)
goto exit_dput;
if (__follow_mount(&path)) {
error = -ELOOP;
if (flag & O_NOFOLLOW)
goto exit_dput;
}
error = -ENOENT;
if (!path.dentry->d_inode)
goto exit_dput;
if (path.dentry->d_inode->i_op->follow_link)
goto do_link;
path_to_nameidata(&path, &nd);
error = -EISDIR;
if (S_ISDIR(path.dentry->d_inode->i_mode))
goto exit;
ok:
/*
* Consider:
* 1. may_open() truncates a file
* 2. a rw->ro mount transition occurs
* 3. nameidata_to_filp() fails due to
* the ro mount.
* That would be inconsistent, and should
* be avoided. Taking this mnt write here
* ensures that (2) can not occur.
*/
will_truncate = open_will_truncate(flag, nd.path.dentry->d_inode);
if (will_truncate) {
error = mnt_want_write(nd.path.mnt);
if (error)
goto exit;
}
error = may_open(&nd.path, acc_mode, flag);
if (error) {
if (will_truncate)
mnt_drop_write(nd.path.mnt);
goto exit;
}
filp = nameidata_to_filp(&nd);
if (!IS_ERR(filp)) {
error = ima_path_check(&filp->f_path, filp->f_mode &
(MAY_READ | MAY_WRITE | MAY_EXEC));
if (error) {
fput(filp);
filp = ERR_PTR(error);
}
}
if (!IS_ERR(filp)) {
if (acc_mode & MAY_WRITE)
vfs_dq_init(nd.path.dentry->d_inode);
if (will_truncate) {
error = handle_truncate(&nd.path);
if (error) {
fput(filp);
filp = ERR_PTR(error);
}
}
}
/*
* It is now safe to drop the mnt write
* because the filp has had a write taken
* on its behalf.
*/
if (will_truncate)
mnt_drop_write(nd.path.mnt);
if (nd.root.mnt)
path_put(&nd.root);
return filp;
exit_mutex_unlock:
mutex_unlock(&dir->d_inode->i_mutex);
exit_dput:
path_put_conditional(&path, &nd);
exit:
if (!IS_ERR(nd.intent.open.file))
release_open_intent(&nd);
exit_parent:
if (nd.root.mnt)
path_put(&nd.root);
path_put(&nd.path);
return ERR_PTR(error);
do_link:
error = -ELOOP;
if (flag & O_NOFOLLOW)
goto exit_dput;
/*
* This is subtle. Instead of calling do_follow_link() we do the
* thing by hands. The reason is that this way we have zero link_count
* and path_walk() (called from ->follow_link) honoring LOOKUP_PARENT.
* After that we have the parent and last component, i.e.
* we are in the same situation as after the first path_walk().
* Well, almost - if the last component is normal we get its copy
* stored in nd->last.name and we will have to putname() it when we
* are done. Procfs-like symlinks just set LAST_BIND.
*/
nd.flags |= LOOKUP_PARENT;
error = security_inode_follow_link(path.dentry, &nd);
if (error)
goto exit_dput;
save = nd.path;
path_get(&save);
error = __do_follow_link(&path, &nd);
if (error == -ESTALE) {
/* nd.path had been dropped */
nd.path = save;
path_get(&nd.path);
nd.flags |= LOOKUP_REVAL;
error = __do_follow_link(&path, &nd);
}
path_put(&save);
path_put(&path);
if (error) {
/* Does someone understand code flow here? Or it is only
* me so stupid? Anathema to whoever designed this non-sense
* with "intent.open".
*/
release_open_intent(&nd);
if (nd.root.mnt)
path_put(&nd.root);
return ERR_PTR(error);
}
nd.flags &= ~LOOKUP_PARENT;
if (nd.last_type == LAST_BIND)
goto ok;
error = -EISDIR;
if (nd.last_type != LAST_NORM)
goto exit;
if (nd.last.name[nd.last.len]) {
__putname(nd.last.name);
goto exit;
}
error = -ELOOP;
if (count++==32) {
__putname(nd.last.name);
goto exit;
}
dir = nd.path.dentry;
mutex_lock(&dir->d_inode->i_mutex);
path.dentry = lookup_hash(&nd);
path.mnt = nd.path.mnt;
__putname(nd.last.name);
goto do_last;
}
|
struct file *do_filp_open(int dfd, const char *pathname,
int open_flag, int mode, int acc_mode)
{
struct file *filp;
struct nameidata nd;
int error;
struct path path, save;
struct dentry *dir;
int count = 0;
int will_truncate;
int flag = open_to_namei_flags(open_flag);
/*
* O_SYNC is implemented as __O_SYNC|O_DSYNC. As many places only
* check for O_DSYNC if the need any syncing at all we enforce it's
* always set instead of having to deal with possibly weird behaviour
* for malicious applications setting only __O_SYNC.
*/
if (open_flag & __O_SYNC)
open_flag |= O_DSYNC;
if (!acc_mode)
acc_mode = MAY_OPEN | ACC_MODE(flag);
/* O_TRUNC implies we need access checks for write permissions */
if (flag & O_TRUNC)
acc_mode |= MAY_WRITE;
/* Allow the LSM permission hook to distinguish append
access from general write access. */
if (flag & O_APPEND)
acc_mode |= MAY_APPEND;
/*
* The simplest case - just a plain lookup.
*/
if (!(flag & O_CREAT)) {
filp = get_empty_filp();
if (filp == NULL)
return ERR_PTR(-ENFILE);
nd.intent.open.file = filp;
filp->f_flags = open_flag;
nd.intent.open.flags = flag;
nd.intent.open.create_mode = 0;
error = do_path_lookup(dfd, pathname,
lookup_flags(flag)|LOOKUP_OPEN, &nd);
if (IS_ERR(nd.intent.open.file)) {
if (error == 0) {
error = PTR_ERR(nd.intent.open.file);
path_put(&nd.path);
}
} else if (error)
release_open_intent(&nd);
if (error)
return ERR_PTR(error);
goto ok;
}
/*
* Create - we need to know the parent.
*/
error = path_init(dfd, pathname, LOOKUP_PARENT, &nd);
if (error)
return ERR_PTR(error);
error = path_walk(pathname, &nd);
if (error) {
if (nd.root.mnt)
path_put(&nd.root);
return ERR_PTR(error);
}
if (unlikely(!audit_dummy_context()))
audit_inode(pathname, nd.path.dentry);
/*
* We have the parent and last component. First of all, check
* that we are not asked to creat(2) an obvious directory - that
* will not do.
*/
error = -EISDIR;
if (nd.last_type != LAST_NORM || nd.last.name[nd.last.len])
goto exit_parent;
error = -ENFILE;
filp = get_empty_filp();
if (filp == NULL)
goto exit_parent;
nd.intent.open.file = filp;
filp->f_flags = open_flag;
nd.intent.open.flags = flag;
nd.intent.open.create_mode = mode;
dir = nd.path.dentry;
nd.flags &= ~LOOKUP_PARENT;
nd.flags |= LOOKUP_CREATE | LOOKUP_OPEN;
if (flag & O_EXCL)
nd.flags |= LOOKUP_EXCL;
mutex_lock(&dir->d_inode->i_mutex);
path.dentry = lookup_hash(&nd);
path.mnt = nd.path.mnt;
do_last:
error = PTR_ERR(path.dentry);
if (IS_ERR(path.dentry)) {
mutex_unlock(&dir->d_inode->i_mutex);
goto exit;
}
if (IS_ERR(nd.intent.open.file)) {
error = PTR_ERR(nd.intent.open.file);
goto exit_mutex_unlock;
}
/* Negative dentry, just create the file */
if (!path.dentry->d_inode) {
/*
* This write is needed to ensure that a
* ro->rw transition does not occur between
* the time when the file is created and when
* a permanent write count is taken through
* the 'struct file' in nameidata_to_filp().
*/
error = mnt_want_write(nd.path.mnt);
if (error)
goto exit_mutex_unlock;
error = __open_namei_create(&nd, &path, flag, mode);
if (error) {
mnt_drop_write(nd.path.mnt);
goto exit;
}
filp = nameidata_to_filp(&nd);
mnt_drop_write(nd.path.mnt);
if (nd.root.mnt)
path_put(&nd.root);
if (!IS_ERR(filp)) {
error = ima_path_check(&filp->f_path, filp->f_mode &
(MAY_READ | MAY_WRITE | MAY_EXEC));
if (error) {
fput(filp);
filp = ERR_PTR(error);
}
}
return filp;
}
/*
* It already exists.
*/
mutex_unlock(&dir->d_inode->i_mutex);
audit_inode(pathname, path.dentry);
error = -EEXIST;
if (flag & O_EXCL)
goto exit_dput;
if (__follow_mount(&path)) {
error = -ELOOP;
if (flag & O_NOFOLLOW)
goto exit_dput;
}
error = -ENOENT;
if (!path.dentry->d_inode)
goto exit_dput;
if (path.dentry->d_inode->i_op->follow_link)
goto do_link;
path_to_nameidata(&path, &nd);
error = -EISDIR;
if (S_ISDIR(path.dentry->d_inode->i_mode))
goto exit;
ok:
/*
* Consider:
* 1. may_open() truncates a file
* 2. a rw->ro mount transition occurs
* 3. nameidata_to_filp() fails due to
* the ro mount.
* That would be inconsistent, and should
* be avoided. Taking this mnt write here
* ensures that (2) can not occur.
*/
will_truncate = open_will_truncate(flag, nd.path.dentry->d_inode);
if (will_truncate) {
error = mnt_want_write(nd.path.mnt);
if (error)
goto exit;
}
error = may_open(&nd.path, acc_mode, flag);
if (error) {
if (will_truncate)
mnt_drop_write(nd.path.mnt);
goto exit;
}
filp = nameidata_to_filp(&nd);
if (!IS_ERR(filp)) {
error = ima_path_check(&filp->f_path, filp->f_mode &
(MAY_READ | MAY_WRITE | MAY_EXEC));
if (error) {
fput(filp);
filp = ERR_PTR(error);
}
}
if (!IS_ERR(filp)) {
if (acc_mode & MAY_WRITE)
vfs_dq_init(nd.path.dentry->d_inode);
if (will_truncate) {
error = handle_truncate(&nd.path);
if (error) {
fput(filp);
filp = ERR_PTR(error);
}
}
}
/*
* It is now safe to drop the mnt write
* because the filp has had a write taken
* on its behalf.
*/
if (will_truncate)
mnt_drop_write(nd.path.mnt);
if (nd.root.mnt)
path_put(&nd.root);
return filp;
exit_mutex_unlock:
mutex_unlock(&dir->d_inode->i_mutex);
exit_dput:
path_put_conditional(&path, &nd);
exit:
if (!IS_ERR(nd.intent.open.file))
release_open_intent(&nd);
exit_parent:
if (nd.root.mnt)
path_put(&nd.root);
path_put(&nd.path);
return ERR_PTR(error);
do_link:
error = -ELOOP;
if (flag & O_NOFOLLOW)
goto exit_dput;
/*
* This is subtle. Instead of calling do_follow_link() we do the
* thing by hands. The reason is that this way we have zero link_count
* and path_walk() (called from ->follow_link) honoring LOOKUP_PARENT.
* After that we have the parent and last component, i.e.
* we are in the same situation as after the first path_walk().
* Well, almost - if the last component is normal we get its copy
* stored in nd->last.name and we will have to putname() it when we
* are done. Procfs-like symlinks just set LAST_BIND.
*/
nd.flags |= LOOKUP_PARENT;
error = security_inode_follow_link(path.dentry, &nd);
if (error)
goto exit_dput;
save = nd.path;
path_get(&save);
error = __do_follow_link(&path, &nd);
if (error == -ESTALE) {
/* nd.path had been dropped */
nd.path = save;
path_get(&nd.path);
nd.flags |= LOOKUP_REVAL;
error = __do_follow_link(&path, &nd);
}
path_put(&save);
path_put(&path);
if (error) {
/* Does someone understand code flow here? Or it is only
* me so stupid? Anathema to whoever designed this non-sense
* with "intent.open".
*/
release_open_intent(&nd);
if (nd.root.mnt)
path_put(&nd.root);
return ERR_PTR(error);
}
nd.flags &= ~LOOKUP_PARENT;
if (nd.last_type == LAST_BIND)
goto ok;
error = -EISDIR;
if (nd.last_type != LAST_NORM)
goto exit;
if (nd.last.name[nd.last.len]) {
__putname(nd.last.name);
goto exit;
}
error = -ELOOP;
if (count++==32) {
__putname(nd.last.name);
goto exit;
}
dir = nd.path.dentry;
mutex_lock(&dir->d_inode->i_mutex);
path.dentry = lookup_hash(&nd);
path.mnt = nd.path.mnt;
__putname(nd.last.name);
goto do_last;
}
|
C
|
linux
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/e93dc535728da259ec16d1c3cc393f80b25f64ae
|
e93dc535728da259ec16d1c3cc393f80b25f64ae
|
Add a unit test that filenames aren't unintentionally converted to URLs.
Also fixes two issues in OSExchangeDataProviderWin:
- It used a disjoint set of clipboard formats when handling
GetUrl(..., true /* filename conversion */) vs GetFilenames(...), so the
actual returned results would vary depending on which one was called.
- It incorrectly used ::DragFinish() instead of ::ReleaseStgMedium().
::DragFinish() is only meant to be used in conjunction with WM_DROPFILES.
BUG=346135
Review URL: https://codereview.chromium.org/380553002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@283226 0039d316-1c4b-4281-b951-d872f2087c98
|
HRESULT DataObjectImpl::EnumDAdvise(IEnumSTATDATA** enumerator) {
return OLE_E_ADVISENOTSUPPORTED;
}
|
HRESULT DataObjectImpl::EnumDAdvise(IEnumSTATDATA** enumerator) {
return OLE_E_ADVISENOTSUPPORTED;
}
|
C
|
Chrome
| 0 |
CVE-2015-6763
|
https://www.cvedetails.com/cve/CVE-2015-6763/
| null |
https://github.com/chromium/chromium/commit/f1574f25e1402e748bf2bd7e28ce3dd96ceb1ca4
|
f1574f25e1402e748bf2bd7e28ce3dd96ceb1ca4
|
MacViews: Enable secure text input for password Textfields.
In Cocoa the NSTextInputContext automatically enables secure text input
when activated and it's in the secure text entry mode.
RenderWidgetHostViewMac did the similar thing for ages following the
WebKit example.
views::Textfield needs to do the same thing in a fashion that's
sycnrhonized with RenderWidgetHostViewMac, otherwise the race conditions
are possible when the Textfield gets focus, activates the secure text
input mode and the RWHVM loses focus immediately afterwards and disables
the secure text input instead of leaving it in the enabled state.
BUG=818133,677220
Change-Id: I6db6c4b59e4a1a72cbb7f8c7056f71b04a3df08b
Reviewed-on: https://chromium-review.googlesource.com/943064
Commit-Queue: Michail Pishchagin <[email protected]>
Reviewed-by: Pavel Feldman <[email protected]>
Reviewed-by: Avi Drissman <[email protected]>
Reviewed-by: Peter Kasting <[email protected]>
Cr-Commit-Position: refs/heads/master@{#542517}
|
void LocalDOMWindow::stop() {
if (!GetFrame())
return;
GetFrame()->Loader().StopAllLoaders();
}
|
void LocalDOMWindow::stop() {
if (!GetFrame())
return;
GetFrame()->Loader().StopAllLoaders();
}
|
C
|
Chrome
| 0 |
CVE-2018-17205
|
https://www.cvedetails.com/cve/CVE-2018-17205/
|
CWE-617
|
https://github.com/openvswitch/ovs/commit/0befd1f3745055c32940f5faf9559be6a14395e6
|
0befd1f3745055c32940f5faf9559be6a14395e6
|
ofproto: Fix OVS crash when reverting old flows in bundle commit
During bundle commit flows which are added in bundle are applied
to ofproto in-order. In case if a flow cannot be added (e.g. flow
action is go-to group id which does not exist), OVS tries to
revert back all previous flows which were successfully applied
from the same bundle. This is possible since OVS maintains list
of old flows which were replaced by flows from the bundle.
While reinserting old flows ovs asserts due to check on rule
state != RULE_INITIALIZED. This will work only for new flows, but
for old flow the rule state will be RULE_REMOVED. This is causing
an assert and OVS crash.
The ovs assert check should be modified to != RULE_INSERTED to prevent
any existing rule being re-inserted and allow new rules and old rules
(in case of revert) to get inserted.
Here is an example to trigger the assert:
$ ovs-vsctl add-br br-test -- set Bridge br-test datapath_type=netdev
$ cat flows.txt
flow add table=1,priority=0,in_port=2,actions=NORMAL
flow add table=1,priority=0,in_port=3,actions=NORMAL
$ ovs-ofctl dump-flows -OOpenflow13 br-test
cookie=0x0, duration=2.465s, table=1, n_packets=0, n_bytes=0, priority=0,in_port=2 actions=NORMAL
cookie=0x0, duration=2.465s, table=1, n_packets=0, n_bytes=0, priority=0,in_port=3 actions=NORMAL
$ cat flow-modify.txt
flow modify table=1,priority=0,in_port=2,actions=drop
flow modify table=1,priority=0,in_port=3,actions=group:10
$ ovs-ofctl bundle br-test flow-modify.txt -OOpenflow13
First flow rule will be modified since it is a valid rule. However second
rule is invalid since no group with id 10 exists. Bundle commit tries to
revert (insert) the first rule to old flow which results in ovs_assert at
ofproto_rule_insert__() since old rule->state = RULE_REMOVED.
Signed-off-by: Vishal Deep Ajmera <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
|
OVS_EXCLUDED(ofproto_mutex)
{
struct ofproto_group_mod ogm;
ogm.gm.command = OFPGC11_DELETE;
ogm.gm.group_id = OFPG_ALL;
ovs_mutex_lock(&ofproto_mutex);
ogm.version = ofproto->tables_version + 1;
ofproto_group_mod_start(ofproto, &ogm);
ofproto_bump_tables_version(ofproto);
ofproto_group_mod_finish(ofproto, &ogm, NULL);
ovs_mutex_unlock(&ofproto_mutex);
}
|
OVS_EXCLUDED(ofproto_mutex)
{
struct ofproto_group_mod ogm;
ogm.gm.command = OFPGC11_DELETE;
ogm.gm.group_id = OFPG_ALL;
ovs_mutex_lock(&ofproto_mutex);
ogm.version = ofproto->tables_version + 1;
ofproto_group_mod_start(ofproto, &ogm);
ofproto_bump_tables_version(ofproto);
ofproto_group_mod_finish(ofproto, &ogm, NULL);
ovs_mutex_unlock(&ofproto_mutex);
}
|
C
|
ovs
| 0 |
CVE-2015-5302
|
https://www.cvedetails.com/cve/CVE-2015-5302/
|
CWE-200
|
https://github.com/abrt/libreport/commit/257578a23d1537a2d235aaa2b1488ee4f818e360
|
257578a23d1537a2d235aaa2b1488ee4f818e360
|
wizard: fix save users changes after reviewing dump dir files
If the user reviewed the dump dir's files during reporting the crash, the
changes was thrown away and original data was passed to the bugzilla bug
report.
report-gtk saves the first text view buffer and then reloads data from the
reported problem directory, which causes that the changes made to those text
views are thrown away.
Function save_text_if_changed(), except of saving text, also reload the files
from dump dir and update gui state from the dump dir. The commit moves the
reloading and updating gui functions away from this function.
Related to rhbz#1270235
Signed-off-by: Matej Habrnal <[email protected]>
|
static void g_tv_details_checkbox_toggled(
GtkCellRendererToggle *cell_renderer_UNUSED,
gchar *tree_path,
gpointer user_data_UNUSED)
{
GtkTreeIter iter;
if (!gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(g_ls_details), &iter, tree_path))
return;
gchar *item_name = NULL;
gtk_tree_model_get(GTK_TREE_MODEL(g_ls_details), &iter,
DETAIL_COLUMN_NAME, &item_name,
-1);
if (!item_name) /* paranoia, should never happen */
return;
struct problem_item *item = problem_data_get_item_or_NULL(g_cd, item_name);
g_free(item_name);
if (!item) /* paranoia */
return;
int cur_value;
if (item->selected_by_user == 0)
cur_value = item->default_by_reporter;
else
cur_value = !!(item->selected_by_user + 1); /* map -1,1 to 0,1 */
if (item->allowed_by_reporter && !item->required_by_reporter)
{
cur_value = !cur_value;
item->selected_by_user = cur_value * 2 - 1; /* map 0,1 to -1,1 */
gtk_list_store_set(g_ls_details, &iter,
DETAIL_COLUMN_CHECKBOX, cur_value,
-1);
}
}
|
static void g_tv_details_checkbox_toggled(
GtkCellRendererToggle *cell_renderer_UNUSED,
gchar *tree_path,
gpointer user_data_UNUSED)
{
GtkTreeIter iter;
if (!gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(g_ls_details), &iter, tree_path))
return;
gchar *item_name = NULL;
gtk_tree_model_get(GTK_TREE_MODEL(g_ls_details), &iter,
DETAIL_COLUMN_NAME, &item_name,
-1);
if (!item_name) /* paranoia, should never happen */
return;
struct problem_item *item = problem_data_get_item_or_NULL(g_cd, item_name);
g_free(item_name);
if (!item) /* paranoia */
return;
int cur_value;
if (item->selected_by_user == 0)
cur_value = item->default_by_reporter;
else
cur_value = !!(item->selected_by_user + 1); /* map -1,1 to 0,1 */
if (item->allowed_by_reporter && !item->required_by_reporter)
{
cur_value = !cur_value;
item->selected_by_user = cur_value * 2 - 1; /* map 0,1 to -1,1 */
gtk_list_store_set(g_ls_details, &iter,
DETAIL_COLUMN_CHECKBOX, cur_value,
-1);
}
}
|
C
|
libreport
| 0 |
CVE-2016-5104
|
https://www.cvedetails.com/cve/CVE-2016-5104/
|
CWE-284
|
https://github.com/libimobiledevice/libimobiledevice/commit/df1f5c4d70d0c19ad40072f5246ca457e7f9849e
|
df1f5c4d70d0c19ad40072f5246ca457e7f9849e
|
common: [security fix] Make sure sockets only listen locally
|
int socket_close(int fd) {
#ifdef WIN32
return closesocket(fd);
#else
return close(fd);
#endif
}
|
int socket_close(int fd) {
#ifdef WIN32
return closesocket(fd);
#else
return close(fd);
#endif
}
|
C
|
libimobiledevice
| 0 |
CVE-2016-0827
|
https://www.cvedetails.com/cve/CVE-2016-0827/
|
CWE-189
|
https://android.googlesource.com/platform/frameworks/av/+/9e29523b9537983b4c4b205ff868d0b3bca0383b
|
9e29523b9537983b4c4b205ff868d0b3bca0383b
|
fix possible overflow in effect wrappers.
Add checks on parameter size field in effect command handlers
to avoid overflow leading to invalid comparison with min allowed
size for command and reply buffers.
Bug: 26347509.
Change-Id: I20e6a9b6de8e5172b957caa1ac9410b9752efa4d
(cherry picked from commit ad1bd92a49d78df6bc6e75bee68c517c1326f3cf)
|
int Reverb_getParameter(ReverbContext *pContext,
void *pParam,
size_t *pValueSize,
void *pValue){
int status = 0;
int32_t *pParamTemp = (int32_t *)pParam;
int32_t param = *pParamTemp++;
char *name;
t_reverb_settings *pProperties;
if (pContext->preset) {
if (param != REVERB_PARAM_PRESET || *pValueSize < sizeof(uint16_t)) {
return -EINVAL;
}
*(uint16_t *)pValue = pContext->nextPreset;
ALOGV("get REVERB_PARAM_PRESET, preset %d", pContext->nextPreset);
return 0;
}
switch (param){
case REVERB_PARAM_ROOM_LEVEL:
if (*pValueSize != sizeof(int16_t)){
ALOGV("\tLVM_ERROR : Reverb_getParameter() invalid pValueSize1 %d", *pValueSize);
return -EINVAL;
}
*pValueSize = sizeof(int16_t);
break;
case REVERB_PARAM_ROOM_HF_LEVEL:
if (*pValueSize != sizeof(int16_t)){
ALOGV("\tLVM_ERROR : Reverb_getParameter() invalid pValueSize12 %d", *pValueSize);
return -EINVAL;
}
*pValueSize = sizeof(int16_t);
break;
case REVERB_PARAM_DECAY_TIME:
if (*pValueSize != sizeof(uint32_t)){
ALOGV("\tLVM_ERROR : Reverb_getParameter() invalid pValueSize3 %d", *pValueSize);
return -EINVAL;
}
*pValueSize = sizeof(uint32_t);
break;
case REVERB_PARAM_DECAY_HF_RATIO:
if (*pValueSize != sizeof(int16_t)){
ALOGV("\tLVM_ERROR : Reverb_getParameter() invalid pValueSize4 %d", *pValueSize);
return -EINVAL;
}
*pValueSize = sizeof(int16_t);
break;
case REVERB_PARAM_REFLECTIONS_LEVEL:
if (*pValueSize != sizeof(int16_t)){
ALOGV("\tLVM_ERROR : Reverb_getParameter() invalid pValueSize5 %d", *pValueSize);
return -EINVAL;
}
*pValueSize = sizeof(int16_t);
break;
case REVERB_PARAM_REFLECTIONS_DELAY:
if (*pValueSize != sizeof(uint32_t)){
ALOGV("\tLVM_ERROR : Reverb_getParameter() invalid pValueSize6 %d", *pValueSize);
return -EINVAL;
}
*pValueSize = sizeof(uint32_t);
break;
case REVERB_PARAM_REVERB_LEVEL:
if (*pValueSize != sizeof(int16_t)){
ALOGV("\tLVM_ERROR : Reverb_getParameter() invalid pValueSize7 %d", *pValueSize);
return -EINVAL;
}
*pValueSize = sizeof(int16_t);
break;
case REVERB_PARAM_REVERB_DELAY:
if (*pValueSize != sizeof(uint32_t)){
ALOGV("\tLVM_ERROR : Reverb_getParameter() invalid pValueSize8 %d", *pValueSize);
return -EINVAL;
}
*pValueSize = sizeof(uint32_t);
break;
case REVERB_PARAM_DIFFUSION:
if (*pValueSize != sizeof(int16_t)){
ALOGV("\tLVM_ERROR : Reverb_getParameter() invalid pValueSize9 %d", *pValueSize);
return -EINVAL;
}
*pValueSize = sizeof(int16_t);
break;
case REVERB_PARAM_DENSITY:
if (*pValueSize != sizeof(int16_t)){
ALOGV("\tLVM_ERROR : Reverb_getParameter() invalid pValueSize10 %d", *pValueSize);
return -EINVAL;
}
*pValueSize = sizeof(int16_t);
break;
case REVERB_PARAM_PROPERTIES:
if (*pValueSize != sizeof(t_reverb_settings)){
ALOGV("\tLVM_ERROR : Reverb_getParameter() invalid pValueSize11 %d", *pValueSize);
return -EINVAL;
}
*pValueSize = sizeof(t_reverb_settings);
break;
default:
ALOGV("\tLVM_ERROR : Reverb_getParameter() invalid param %d", param);
return -EINVAL;
}
pProperties = (t_reverb_settings *) pValue;
switch (param){
case REVERB_PARAM_PROPERTIES:
pProperties->roomLevel = ReverbGetRoomLevel(pContext);
pProperties->roomHFLevel = ReverbGetRoomHfLevel(pContext);
pProperties->decayTime = ReverbGetDecayTime(pContext);
pProperties->decayHFRatio = ReverbGetDecayHfRatio(pContext);
pProperties->reflectionsLevel = 0;
pProperties->reflectionsDelay = 0;
pProperties->reverbDelay = 0;
pProperties->reverbLevel = ReverbGetReverbLevel(pContext);
pProperties->diffusion = ReverbGetDiffusion(pContext);
pProperties->density = ReverbGetDensity(pContext);
ALOGV("\tReverb_getParameter() REVERB_PARAM_PROPERTIES Value is roomLevel %d",
pProperties->roomLevel);
ALOGV("\tReverb_getParameter() REVERB_PARAM_PROPERTIES Value is roomHFLevel %d",
pProperties->roomHFLevel);
ALOGV("\tReverb_getParameter() REVERB_PARAM_PROPERTIES Value is decayTime %d",
pProperties->decayTime);
ALOGV("\tReverb_getParameter() REVERB_PARAM_PROPERTIES Value is decayHFRatio %d",
pProperties->decayHFRatio);
ALOGV("\tReverb_getParameter() REVERB_PARAM_PROPERTIES Value is reflectionsLevel %d",
pProperties->reflectionsLevel);
ALOGV("\tReverb_getParameter() REVERB_PARAM_PROPERTIES Value is reflectionsDelay %d",
pProperties->reflectionsDelay);
ALOGV("\tReverb_getParameter() REVERB_PARAM_PROPERTIES Value is reverbDelay %d",
pProperties->reverbDelay);
ALOGV("\tReverb_getParameter() REVERB_PARAM_PROPERTIES Value is reverbLevel %d",
pProperties->reverbLevel);
ALOGV("\tReverb_getParameter() REVERB_PARAM_PROPERTIES Value is diffusion %d",
pProperties->diffusion);
ALOGV("\tReverb_getParameter() REVERB_PARAM_PROPERTIES Value is density %d",
pProperties->density);
break;
case REVERB_PARAM_ROOM_LEVEL:
*(int16_t *)pValue = ReverbGetRoomLevel(pContext);
break;
case REVERB_PARAM_ROOM_HF_LEVEL:
*(int16_t *)pValue = ReverbGetRoomHfLevel(pContext);
break;
case REVERB_PARAM_DECAY_TIME:
*(uint32_t *)pValue = ReverbGetDecayTime(pContext);
break;
case REVERB_PARAM_DECAY_HF_RATIO:
*(int16_t *)pValue = ReverbGetDecayHfRatio(pContext);
break;
case REVERB_PARAM_REVERB_LEVEL:
*(int16_t *)pValue = ReverbGetReverbLevel(pContext);
break;
case REVERB_PARAM_DIFFUSION:
*(int16_t *)pValue = ReverbGetDiffusion(pContext);
break;
case REVERB_PARAM_DENSITY:
*(uint16_t *)pValue = 0;
*(int16_t *)pValue = ReverbGetDensity(pContext);
break;
case REVERB_PARAM_REFLECTIONS_LEVEL:
*(uint16_t *)pValue = 0;
case REVERB_PARAM_REFLECTIONS_DELAY:
*(uint32_t *)pValue = 0;
case REVERB_PARAM_REVERB_DELAY:
*(uint32_t *)pValue = 0;
break;
default:
ALOGV("\tLVM_ERROR : Reverb_getParameter() invalid param %d", param);
status = -EINVAL;
break;
}
return status;
} /* end Reverb_getParameter */
|
int Reverb_getParameter(ReverbContext *pContext,
void *pParam,
size_t *pValueSize,
void *pValue){
int status = 0;
int32_t *pParamTemp = (int32_t *)pParam;
int32_t param = *pParamTemp++;
char *name;
t_reverb_settings *pProperties;
if (pContext->preset) {
if (param != REVERB_PARAM_PRESET || *pValueSize < sizeof(uint16_t)) {
return -EINVAL;
}
*(uint16_t *)pValue = pContext->nextPreset;
ALOGV("get REVERB_PARAM_PRESET, preset %d", pContext->nextPreset);
return 0;
}
switch (param){
case REVERB_PARAM_ROOM_LEVEL:
if (*pValueSize != sizeof(int16_t)){
ALOGV("\tLVM_ERROR : Reverb_getParameter() invalid pValueSize1 %d", *pValueSize);
return -EINVAL;
}
*pValueSize = sizeof(int16_t);
break;
case REVERB_PARAM_ROOM_HF_LEVEL:
if (*pValueSize != sizeof(int16_t)){
ALOGV("\tLVM_ERROR : Reverb_getParameter() invalid pValueSize12 %d", *pValueSize);
return -EINVAL;
}
*pValueSize = sizeof(int16_t);
break;
case REVERB_PARAM_DECAY_TIME:
if (*pValueSize != sizeof(uint32_t)){
ALOGV("\tLVM_ERROR : Reverb_getParameter() invalid pValueSize3 %d", *pValueSize);
return -EINVAL;
}
*pValueSize = sizeof(uint32_t);
break;
case REVERB_PARAM_DECAY_HF_RATIO:
if (*pValueSize != sizeof(int16_t)){
ALOGV("\tLVM_ERROR : Reverb_getParameter() invalid pValueSize4 %d", *pValueSize);
return -EINVAL;
}
*pValueSize = sizeof(int16_t);
break;
case REVERB_PARAM_REFLECTIONS_LEVEL:
if (*pValueSize != sizeof(int16_t)){
ALOGV("\tLVM_ERROR : Reverb_getParameter() invalid pValueSize5 %d", *pValueSize);
return -EINVAL;
}
*pValueSize = sizeof(int16_t);
break;
case REVERB_PARAM_REFLECTIONS_DELAY:
if (*pValueSize != sizeof(uint32_t)){
ALOGV("\tLVM_ERROR : Reverb_getParameter() invalid pValueSize6 %d", *pValueSize);
return -EINVAL;
}
*pValueSize = sizeof(uint32_t);
break;
case REVERB_PARAM_REVERB_LEVEL:
if (*pValueSize != sizeof(int16_t)){
ALOGV("\tLVM_ERROR : Reverb_getParameter() invalid pValueSize7 %d", *pValueSize);
return -EINVAL;
}
*pValueSize = sizeof(int16_t);
break;
case REVERB_PARAM_REVERB_DELAY:
if (*pValueSize != sizeof(uint32_t)){
ALOGV("\tLVM_ERROR : Reverb_getParameter() invalid pValueSize8 %d", *pValueSize);
return -EINVAL;
}
*pValueSize = sizeof(uint32_t);
break;
case REVERB_PARAM_DIFFUSION:
if (*pValueSize != sizeof(int16_t)){
ALOGV("\tLVM_ERROR : Reverb_getParameter() invalid pValueSize9 %d", *pValueSize);
return -EINVAL;
}
*pValueSize = sizeof(int16_t);
break;
case REVERB_PARAM_DENSITY:
if (*pValueSize != sizeof(int16_t)){
ALOGV("\tLVM_ERROR : Reverb_getParameter() invalid pValueSize10 %d", *pValueSize);
return -EINVAL;
}
*pValueSize = sizeof(int16_t);
break;
case REVERB_PARAM_PROPERTIES:
if (*pValueSize != sizeof(t_reverb_settings)){
ALOGV("\tLVM_ERROR : Reverb_getParameter() invalid pValueSize11 %d", *pValueSize);
return -EINVAL;
}
*pValueSize = sizeof(t_reverb_settings);
break;
default:
ALOGV("\tLVM_ERROR : Reverb_getParameter() invalid param %d", param);
return -EINVAL;
}
pProperties = (t_reverb_settings *) pValue;
switch (param){
case REVERB_PARAM_PROPERTIES:
pProperties->roomLevel = ReverbGetRoomLevel(pContext);
pProperties->roomHFLevel = ReverbGetRoomHfLevel(pContext);
pProperties->decayTime = ReverbGetDecayTime(pContext);
pProperties->decayHFRatio = ReverbGetDecayHfRatio(pContext);
pProperties->reflectionsLevel = 0;
pProperties->reflectionsDelay = 0;
pProperties->reverbDelay = 0;
pProperties->reverbLevel = ReverbGetReverbLevel(pContext);
pProperties->diffusion = ReverbGetDiffusion(pContext);
pProperties->density = ReverbGetDensity(pContext);
ALOGV("\tReverb_getParameter() REVERB_PARAM_PROPERTIES Value is roomLevel %d",
pProperties->roomLevel);
ALOGV("\tReverb_getParameter() REVERB_PARAM_PROPERTIES Value is roomHFLevel %d",
pProperties->roomHFLevel);
ALOGV("\tReverb_getParameter() REVERB_PARAM_PROPERTIES Value is decayTime %d",
pProperties->decayTime);
ALOGV("\tReverb_getParameter() REVERB_PARAM_PROPERTIES Value is decayHFRatio %d",
pProperties->decayHFRatio);
ALOGV("\tReverb_getParameter() REVERB_PARAM_PROPERTIES Value is reflectionsLevel %d",
pProperties->reflectionsLevel);
ALOGV("\tReverb_getParameter() REVERB_PARAM_PROPERTIES Value is reflectionsDelay %d",
pProperties->reflectionsDelay);
ALOGV("\tReverb_getParameter() REVERB_PARAM_PROPERTIES Value is reverbDelay %d",
pProperties->reverbDelay);
ALOGV("\tReverb_getParameter() REVERB_PARAM_PROPERTIES Value is reverbLevel %d",
pProperties->reverbLevel);
ALOGV("\tReverb_getParameter() REVERB_PARAM_PROPERTIES Value is diffusion %d",
pProperties->diffusion);
ALOGV("\tReverb_getParameter() REVERB_PARAM_PROPERTIES Value is density %d",
pProperties->density);
break;
case REVERB_PARAM_ROOM_LEVEL:
*(int16_t *)pValue = ReverbGetRoomLevel(pContext);
break;
case REVERB_PARAM_ROOM_HF_LEVEL:
*(int16_t *)pValue = ReverbGetRoomHfLevel(pContext);
break;
case REVERB_PARAM_DECAY_TIME:
*(uint32_t *)pValue = ReverbGetDecayTime(pContext);
break;
case REVERB_PARAM_DECAY_HF_RATIO:
*(int16_t *)pValue = ReverbGetDecayHfRatio(pContext);
break;
case REVERB_PARAM_REVERB_LEVEL:
*(int16_t *)pValue = ReverbGetReverbLevel(pContext);
break;
case REVERB_PARAM_DIFFUSION:
*(int16_t *)pValue = ReverbGetDiffusion(pContext);
break;
case REVERB_PARAM_DENSITY:
*(uint16_t *)pValue = 0;
*(int16_t *)pValue = ReverbGetDensity(pContext);
break;
case REVERB_PARAM_REFLECTIONS_LEVEL:
*(uint16_t *)pValue = 0;
case REVERB_PARAM_REFLECTIONS_DELAY:
*(uint32_t *)pValue = 0;
case REVERB_PARAM_REVERB_DELAY:
*(uint32_t *)pValue = 0;
break;
default:
ALOGV("\tLVM_ERROR : Reverb_getParameter() invalid param %d", param);
status = -EINVAL;
break;
}
return status;
} /* end Reverb_getParameter */
|
C
|
Android
| 0 |
CVE-2016-4482
|
https://www.cvedetails.com/cve/CVE-2016-4482/
|
CWE-200
|
https://github.com/torvalds/linux/commit/681fef8380eb818c0b845fca5d2ab1dcbab114ee
|
681fef8380eb818c0b845fca5d2ab1dcbab114ee
|
USB: usbfs: fix potential infoleak in devio
The stack object “ci” has a total size of 8 bytes. Its last 3 bytes
are padding bytes which are not initialized and leaked to userland
via “copy_to_user”.
Signed-off-by: Kangjie Lu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
static int driver_resume(struct usb_interface *intf)
{
return 0;
}
|
static int driver_resume(struct usb_interface *intf)
{
return 0;
}
|
C
|
linux
| 0 |
CVE-2018-16088
|
https://www.cvedetails.com/cve/CVE-2018-16088/
| null |
https://github.com/chromium/chromium/commit/4379a7fcff8190aa7ba72307b398161c32102c52
|
4379a7fcff8190aa7ba72307b398161c32102c52
|
Only allow downloading in response to real keyboard modifiers
BUG=848531
Change-Id: I97554c8d312243b55647f1376945aee32dbd95bf
Reviewed-on: https://chromium-review.googlesource.com/1082216
Reviewed-by: Mike West <[email protected]>
Commit-Queue: Jochen Eisinger <[email protected]>
Cr-Commit-Position: refs/heads/master@{#564051}
|
static Frame* ReuseExistingWindow(LocalFrame& active_frame,
LocalFrame& lookup_frame,
const AtomicString& frame_name,
NavigationPolicy policy,
const KURL& destination_url) {
if (!frame_name.IsEmpty() && !EqualIgnoringASCIICase(frame_name, "_blank") &&
policy == kNavigationPolicyIgnore) {
if (Frame* frame = lookup_frame.FindFrameForNavigation(
frame_name, active_frame, destination_url)) {
if (!EqualIgnoringASCIICase(frame_name, "_self")) {
if (Page* page = frame->GetPage()) {
if (page == active_frame.GetPage())
page->GetFocusController().SetFocusedFrame(frame);
else
page->GetChromeClient().Focus(&active_frame);
}
}
return frame;
}
}
return nullptr;
}
|
static Frame* ReuseExistingWindow(LocalFrame& active_frame,
LocalFrame& lookup_frame,
const AtomicString& frame_name,
NavigationPolicy policy,
const KURL& destination_url) {
if (!frame_name.IsEmpty() && !EqualIgnoringASCIICase(frame_name, "_blank") &&
policy == kNavigationPolicyIgnore) {
if (Frame* frame = lookup_frame.FindFrameForNavigation(
frame_name, active_frame, destination_url)) {
if (!EqualIgnoringASCIICase(frame_name, "_self")) {
if (Page* page = frame->GetPage()) {
if (page == active_frame.GetPage())
page->GetFocusController().SetFocusedFrame(frame);
else
page->GetChromeClient().Focus(&active_frame);
}
}
return frame;
}
}
return nullptr;
}
|
C
|
Chrome
| 0 |
CVE-2011-2802
|
https://www.cvedetails.com/cve/CVE-2011-2802/
|
CWE-399
|
https://github.com/chromium/chromium/commit/4ab22cfc619ee8ff17a8c50e289ec3b30731ceba
|
4ab22cfc619ee8ff17a8c50e289ec3b30731ceba
|
In chromedriver, add /log url to get the contents of the chromedriver log
remotely. Also add a 'chrome.verbose' boolean startup option.
Remove usage of VLOG(1) in chromedriver. We do not need as complicated
logging as in Chrome.
BUG=85241
TEST=none
Review URL: http://codereview.chromium.org/7104085
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88591 0039d316-1c4b-4281-b951-d872f2087c98
|
Error* Automation::CompareVersion(int client_build_no,
int client_patch_no,
bool* is_newer_or_equal) {
std::string version = automation()->server_version();
std::vector<std::string> split_version;
base::SplitString(version, '.', &split_version);
if (split_version.size() != 4) {
return new Error(
kUnknownError, "Browser version has unrecognized format: " + version);
}
int build_no, patch_no;
if (!base::StringToInt(split_version[2], &build_no) ||
!base::StringToInt(split_version[3], &patch_no)) {
return new Error(
kUnknownError, "Browser version has unrecognized format: " + version);
}
if (build_no < client_build_no)
*is_newer_or_equal = false;
else if (build_no > client_build_no)
*is_newer_or_equal = true;
else
*is_newer_or_equal = patch_no >= client_patch_no;
return NULL;
}
|
Error* Automation::CompareVersion(int client_build_no,
int client_patch_no,
bool* is_newer_or_equal) {
std::string version = automation()->server_version();
std::vector<std::string> split_version;
base::SplitString(version, '.', &split_version);
if (split_version.size() != 4) {
return new Error(
kUnknownError, "Browser version has unrecognized format: " + version);
}
int build_no, patch_no;
if (!base::StringToInt(split_version[2], &build_no) ||
!base::StringToInt(split_version[3], &patch_no)) {
return new Error(
kUnknownError, "Browser version has unrecognized format: " + version);
}
if (build_no < client_build_no)
*is_newer_or_equal = false;
else if (build_no > client_build_no)
*is_newer_or_equal = true;
else
*is_newer_or_equal = patch_no >= client_patch_no;
return NULL;
}
|
C
|
Chrome
| 0 |
CVE-2015-0228
|
https://www.cvedetails.com/cve/CVE-2015-0228/
|
CWE-20
|
https://github.com/apache/httpd/commit/643f0fcf3b8ab09a68f0ecd2aa37aafeda3e63ef
|
643f0fcf3b8ab09a68f0ecd2aa37aafeda3e63ef
|
*) SECURITY: CVE-2015-0228 (cve.mitre.org)
mod_lua: A maliciously crafted websockets PING after a script
calls r:wsupgrade() can cause a child process crash.
[Edward Lu <Chaosed0 gmail.com>]
Discovered by Guido Vranken <guidovranken gmail.com>
Submitted by: Edward Lu
Committed by: covener
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1657261 13f79535-47bb-0310-9956-ffa450edef68
|
static const char *req_filename_field(request_rec *r)
{
return r->filename;
}
|
static const char *req_filename_field(request_rec *r)
{
return r->filename;
}
|
C
|
httpd
| 0 |
CVE-2016-8666
|
https://www.cvedetails.com/cve/CVE-2016-8666/
|
CWE-400
|
https://github.com/torvalds/linux/commit/fac8e0f579695a3ecbc4d3cac369139d7f819971
|
fac8e0f579695a3ecbc4d3cac369139d7f819971
|
tunnels: Don't apply GRO to multiple layers of encapsulation.
When drivers express support for TSO of encapsulated packets, they
only mean that they can do it for one layer of encapsulation.
Supporting additional levels would mean updating, at a minimum,
more IP length fields and they are unaware of this.
No encapsulation device expresses support for handling offloaded
encapsulated packets, so we won't generate these types of frames
in the transmit path. However, GRO doesn't have a check for
multiple levels of encapsulation and will attempt to build them.
UDP tunnel GRO actually does prevent this situation but it only
handles multiple UDP tunnels stacked on top of each other. This
generalizes that solution to prevent any kind of tunnel stacking
that would cause problems.
Fixes: bf5a755f ("net-gre-gro: Add GRE support to the GRO stack")
Signed-off-by: Jesse Gross <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
static inline struct hlist_head *dev_name_hash(struct net *net, const char *name)
{
unsigned int hash = full_name_hash(name, strnlen(name, IFNAMSIZ));
return &net->dev_name_head[hash_32(hash, NETDEV_HASHBITS)];
}
|
static inline struct hlist_head *dev_name_hash(struct net *net, const char *name)
{
unsigned int hash = full_name_hash(name, strnlen(name, IFNAMSIZ));
return &net->dev_name_head[hash_32(hash, NETDEV_HASHBITS)];
}
|
C
|
linux
| 0 |
CVE-2011-2350
|
https://www.cvedetails.com/cve/CVE-2011-2350/
|
CWE-20
|
https://github.com/chromium/chromium/commit/b944f670bb7a8a919daac497a4ea0536c954c201
|
b944f670bb7a8a919daac497a4ea0536c954c201
|
[JSC] Implement a helper method createNotEnoughArgumentsError()
https://bugs.webkit.org/show_bug.cgi?id=85102
Reviewed by Geoffrey Garen.
In bug 84787, kbr@ requested to avoid hard-coding
createTypeError(exec, "Not enough arguments") here and there.
This patch implements createNotEnoughArgumentsError(exec)
and uses it in JSC bindings.
c.f. a corresponding bug for V8 bindings is bug 85097.
Source/JavaScriptCore:
* runtime/Error.cpp:
(JSC::createNotEnoughArgumentsError):
(JSC):
* runtime/Error.h:
(JSC):
Source/WebCore:
Test: bindings/scripts/test/TestObj.idl
* bindings/scripts/CodeGeneratorJS.pm: Modified as described above.
(GenerateArgumentsCountCheck):
* bindings/js/JSDataViewCustom.cpp: Ditto.
(WebCore::getDataViewMember):
(WebCore::setDataViewMember):
* bindings/js/JSDeprecatedPeerConnectionCustom.cpp:
(WebCore::JSDeprecatedPeerConnectionConstructor::constructJSDeprecatedPeerConnection):
* bindings/js/JSDirectoryEntryCustom.cpp:
(WebCore::JSDirectoryEntry::getFile):
(WebCore::JSDirectoryEntry::getDirectory):
* bindings/js/JSSharedWorkerCustom.cpp:
(WebCore::JSSharedWorkerConstructor::constructJSSharedWorker):
* bindings/js/JSWebKitMutationObserverCustom.cpp:
(WebCore::JSWebKitMutationObserverConstructor::constructJSWebKitMutationObserver):
(WebCore::JSWebKitMutationObserver::observe):
* bindings/js/JSWorkerCustom.cpp:
(WebCore::JSWorkerConstructor::constructJSWorker):
* bindings/scripts/test/JS/JSFloat64Array.cpp: Updated run-bindings-tests.
(WebCore::jsFloat64ArrayPrototypeFunctionFoo):
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
(WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction):
(WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
(WebCore::jsTestCustomNamedGetterPrototypeFunctionAnotherFunction):
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::jsTestEventTargetPrototypeFunctionItem):
(WebCore::jsTestEventTargetPrototypeFunctionAddEventListener):
(WebCore::jsTestEventTargetPrototypeFunctionRemoveEventListener):
(WebCore::jsTestEventTargetPrototypeFunctionDispatchEvent):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::JSTestInterfaceConstructor::constructJSTestInterface):
(WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
(WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObjConstructor::constructJSTestObj):
(WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionIntMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg):
(WebCore::jsTestObjPrototypeFunctionMethodReturningSequence):
(WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
(WebCore::jsTestObjPrototypeFunctionSerializedValue):
(WebCore::jsTestObjPrototypeFunctionIdbKey):
(WebCore::jsTestObjPrototypeFunctionOptionsObject):
(WebCore::jsTestObjPrototypeFunctionAddEventListener):
(WebCore::jsTestObjPrototypeFunctionRemoveEventListener):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
(WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod3):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod4):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod5):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod6):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod7):
(WebCore::jsTestObjConstructorFunctionClassMethod2):
(WebCore::jsTestObjConstructorFunctionOverloadedMethod11):
(WebCore::jsTestObjConstructorFunctionOverloadedMethod12):
(WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongArray):
(WebCore::jsTestObjPrototypeFunctionConvert1):
(WebCore::jsTestObjPrototypeFunctionConvert2):
(WebCore::jsTestObjPrototypeFunctionConvert3):
(WebCore::jsTestObjPrototypeFunctionConvert4):
(WebCore::jsTestObjPrototypeFunctionConvert5):
(WebCore::jsTestObjPrototypeFunctionStrictFunction):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::JSTestSerializedScriptValueInterfaceConstructor::constructJSTestSerializedScriptValueInterface):
(WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionAcceptTransferList):
git-svn-id: svn://svn.chromium.org/blink/trunk@115536 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
JSObject* createError(JSGlobalObject* globalObject, const UString& message)
{
ASSERT(!message.isEmpty());
return ErrorInstance::create(globalObject->globalData(), globalObject->errorStructure(), message);
}
|
JSObject* createError(JSGlobalObject* globalObject, const UString& message)
{
ASSERT(!message.isEmpty());
return ErrorInstance::create(globalObject->globalData(), globalObject->errorStructure(), message);
}
|
C
|
Chrome
| 0 |
CVE-2013-3222
|
https://www.cvedetails.com/cve/CVE-2013-3222/
|
CWE-200
|
https://github.com/torvalds/linux/commit/9b3e617f3df53822345a8573b6d358f6b9e5ed87
|
9b3e617f3df53822345a8573b6d358f6b9e5ed87
|
atm: update msg_namelen in vcc_recvmsg()
The current code does not fill the msg_name member in case it is set.
It also does not set the msg_namelen member to 0 and therefore makes
net/socket.c leak the local, uninitialized sockaddr_storage variable
to userland -- 128 bytes of kernel stack memory.
Fix that by simply setting msg_namelen to 0 as obviously nobody cared
about vcc_recvmsg() not filling the msg_name in case it was set.
Signed-off-by: Mathias Krause <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
static void __vcc_insert_socket(struct sock *sk)
{
struct atm_vcc *vcc = atm_sk(sk);
struct hlist_head *head = &vcc_hash[vcc->vci & (VCC_HTABLE_SIZE - 1)];
sk->sk_hash = vcc->vci & (VCC_HTABLE_SIZE - 1);
sk_add_node(sk, head);
}
|
static void __vcc_insert_socket(struct sock *sk)
{
struct atm_vcc *vcc = atm_sk(sk);
struct hlist_head *head = &vcc_hash[vcc->vci & (VCC_HTABLE_SIZE - 1)];
sk->sk_hash = vcc->vci & (VCC_HTABLE_SIZE - 1);
sk_add_node(sk, head);
}
|
C
|
linux
| 0 |
CVE-2016-9794
|
https://www.cvedetails.com/cve/CVE-2016-9794/
|
CWE-416
|
https://github.com/torvalds/linux/commit/3aa02cb664c5fb1042958c8d1aa8c35055a2ebc4
|
3aa02cb664c5fb1042958c8d1aa8c35055a2ebc4
|
ALSA: pcm : Call kill_fasync() in stream lock
Currently kill_fasync() is called outside the stream lock in
snd_pcm_period_elapsed(). This is potentially racy, since the stream
may get released even during the irq handler is running. Although
snd_pcm_release_substream() calls snd_pcm_drop(), this doesn't
guarantee that the irq handler finishes, thus the kill_fasync() call
outside the stream spin lock may be invoked after the substream is
detached, as recently reported by KASAN.
As a quick workaround, move kill_fasync() call inside the stream
lock. The fasync is rarely used interface, so this shouldn't have a
big impact from the performance POV.
Ideally, we should implement some sync mechanism for the proper finish
of stream and irq handler. But this oneliner should suffice for most
cases, so far.
Reported-by: Baozeng Ding <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
|
int snd_pcm_update_hw_ptr(struct snd_pcm_substream *substream)
{
return snd_pcm_update_hw_ptr0(substream, 0);
}
|
int snd_pcm_update_hw_ptr(struct snd_pcm_substream *substream)
{
return snd_pcm_update_hw_ptr0(substream, 0);
}
|
C
|
linux
| 0 |
CVE-2016-1621
|
https://www.cvedetails.com/cve/CVE-2016-1621/
|
CWE-119
|
https://android.googlesource.com/platform/external/libvpx/+/04839626ed859623901ebd3a5fd483982186b59d
|
04839626ed859623901ebd3a5fd483982186b59d
|
libwebm: Pull from upstream
Rolling mkvparser from upstream. Primarily for fixing a bug on parsing
failures with certain Opus WebM files.
Upstream commit hash of this pull: 574045edd4ecbeb802ee3f1d214b5510269852ae
The diff is so huge because there were some style clean ups upstream.
But it was ensured that there were no breaking changes when the style
clean ups was done upstream.
Change-Id: Ib6e907175484b4b0ae1b55ab39522ea3188ad039
|
const Chapters::Display* Chapters::Atom::GetDisplay(int index) const
|
const Chapters::Display* Chapters::Atom::GetDisplay(int index) const
{
if (index < 0)
return NULL;
if (index >= m_displays_count)
return NULL;
return m_displays + index;
}
|
C
|
Android
| 1 |
CVE-2017-5940
|
https://www.cvedetails.com/cve/CVE-2017-5940/
|
CWE-269
|
https://github.com/netblue30/firejail/commit/903fd8a0789ca3cc3c21d84cd0282481515592ef
|
903fd8a0789ca3cc3c21d84cd0282481515592ef
|
security fix
|
static void skel(const char *homedir, uid_t u, gid_t g) {
char *fname;
if (arg_zsh) {
if (asprintf(&fname, "%s/.zshrc", homedir) == -1)
errExit("asprintf");
struct stat s;
if (stat(fname, &s) == 0)
return;
if (is_link(fname)) { // stat on dangling symlinks fails, try again using lstat
fprintf(stderr, "Error: invalid %s file\n", fname);
exit(1);
}
if (stat("/etc/skel/.zshrc", &s) == 0) {
copy_file_as_user("/etc/skel/.zshrc", fname, u, g, 0644); // regular user
fs_logger("clone /etc/skel/.zshrc");
}
else {
touch_file_as_user(fname, u, g, 0644);
fs_logger2("touch", fname);
}
free(fname);
}
else if (arg_csh) {
if (asprintf(&fname, "%s/.cshrc", homedir) == -1)
errExit("asprintf");
struct stat s;
if (stat(fname, &s) == 0)
return;
if (is_link(fname)) { // stat on dangling symlinks fails, try again using lstat
fprintf(stderr, "Error: invalid %s file\n", fname);
exit(1);
}
if (stat("/etc/skel/.cshrc", &s) == 0) {
copy_file_as_user("/etc/skel/.cshrc", fname, u, g, 0644); // regular user
fs_logger("clone /etc/skel/.cshrc");
}
else {
touch_file_as_user(fname, u, g, 0644);
fs_logger2("touch", fname);
}
free(fname);
}
else {
if (asprintf(&fname, "%s/.bashrc", homedir) == -1)
errExit("asprintf");
struct stat s;
if (stat(fname, &s) == 0)
return;
if (is_link(fname)) { // stat on dangling symlinks fails, try again using lstat
fprintf(stderr, "Error: invalid %s file\n", fname);
exit(1);
}
if (stat("/etc/skel/.bashrc", &s) == 0) {
copy_file_as_user("/etc/skel/.bashrc", fname, u, g, 0644); // regular user
fs_logger("clone /etc/skel/.bashrc");
}
free(fname);
}
}
|
static void skel(const char *homedir, uid_t u, gid_t g) {
char *fname;
if (arg_zsh) {
if (asprintf(&fname, "%s/.zshrc", homedir) == -1)
errExit("asprintf");
struct stat s;
if (stat(fname, &s) == 0)
return;
if (stat("/etc/skel/.zshrc", &s) == 0) {
if (is_link("/etc/skel/.zshrc")) {
fprintf(stderr, "Error: invalid /etc/skel/.zshrc file\n");
exit(1);
}
if (copy_file("/etc/skel/.zshrc", fname) == 0) {
if (chown(fname, u, g) == -1)
errExit("chown");
fs_logger("clone /etc/skel/.zshrc");
}
}
else { //
FILE *fp = fopen(fname, "w");
if (fp) {
fprintf(fp, "\n");
fclose(fp);
if (chown(fname, u, g) == -1)
errExit("chown");
if (chmod(fname, S_IRUSR | S_IWUSR) < 0)
errExit("chown");
fs_logger2("touch", fname);
}
}
free(fname);
}
else if (arg_csh) {
if (asprintf(&fname, "%s/.cshrc", homedir) == -1)
errExit("asprintf");
struct stat s;
if (stat(fname, &s) == 0)
return;
if (stat("/etc/skel/.cshrc", &s) == 0) {
if (is_link("/etc/skel/.cshrc")) {
fprintf(stderr, "Error: invalid /etc/skel/.cshrc file\n");
exit(1);
}
if (copy_file("/etc/skel/.cshrc", fname) == 0) {
if (chown(fname, u, g) == -1)
errExit("chown");
fs_logger("clone /etc/skel/.cshrc");
}
}
else { //
/* coverity[toctou] */
FILE *fp = fopen(fname, "w");
if (fp) {
fprintf(fp, "\n");
fclose(fp);
if (chown(fname, u, g) == -1)
errExit("chown");
if (chmod(fname, S_IRUSR | S_IWUSR) < 0)
errExit("chown");
fs_logger2("touch", fname);
}
}
free(fname);
}
else {
if (asprintf(&fname, "%s/.bashrc", homedir) == -1)
errExit("asprintf");
struct stat s;
if (stat(fname, &s) == 0)
return;
if (stat("/etc/skel/.bashrc", &s) == 0) {
if (is_link("/etc/skel/.bashrc")) {
fprintf(stderr, "Error: invalid /etc/skel/.bashrc file\n");
exit(1);
}
if (copy_file("/etc/skel/.bashrc", fname) == 0) {
/* coverity[toctou] */
if (chown(fname, u, g) == -1)
errExit("chown");
fs_logger("clone /etc/skel/.bashrc");
}
}
free(fname);
}
}
|
C
|
firejail
| 1 |
CVE-2015-4036
|
https://www.cvedetails.com/cve/CVE-2015-4036/
|
CWE-119
|
https://github.com/torvalds/linux/commit/59c816c1f24df0204e01851431d3bab3eb76719c
|
59c816c1f24df0204e01851431d3bab3eb76719c
|
vhost/scsi: potential memory corruption
This code in vhost_scsi_make_tpg() is confusing because we limit "tpgt"
to UINT_MAX but the data type of "tpg->tport_tpgt" and that is a u16.
I looked at the context and it turns out that in
vhost_scsi_set_endpoint(), "tpg->tport_tpgt" is used as an offset into
the vs_tpg[] array which has VHOST_SCSI_MAX_TARGET (256) elements so
anything higher than 255 then it is invalid. I have made that the limit
now.
In vhost_scsi_send_evt() we mask away values higher than 255, but now
that the limit has changed, we don't need the mask.
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Nicholas Bellinger <[email protected]>
|
static int vhost_scsi_check_true(struct se_portal_group *se_tpg)
{
return 1;
}
|
static int vhost_scsi_check_true(struct se_portal_group *se_tpg)
{
return 1;
}
|
C
|
linux
| 0 |
CVE-2013-0910
|
https://www.cvedetails.com/cve/CVE-2013-0910/
|
CWE-287
|
https://github.com/chromium/chromium/commit/ac8bd041b81e46e4e4fcd5021aaa5499703952e6
|
ac8bd041b81e46e4e4fcd5021aaa5499703952e6
|
Follow-on fixes and naming changes for https://codereview.chromium.org/12086077/
BUG=172573
Review URL: https://codereview.chromium.org/12177018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180600 0039d316-1c4b-4281-b951-d872f2087c98
|
void RenderMessageFilter::OnCompletedOpenChannelToNpapiPlugin(
OpenChannelToNpapiPluginCallback* client) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
DCHECK(ContainsKey(plugin_host_clients_, client));
plugin_host_clients_.erase(client);
}
|
void RenderMessageFilter::OnCompletedOpenChannelToNpapiPlugin(
OpenChannelToNpapiPluginCallback* client) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
DCHECK(ContainsKey(plugin_host_clients_, client));
plugin_host_clients_.erase(client);
}
|
C
|
Chrome
| 0 |
CVE-2019-5799
|
https://www.cvedetails.com/cve/CVE-2019-5799/
|
CWE-20
|
https://github.com/chromium/chromium/commit/108147dfd1ea159fd3632ef92ccc4ab8952980c7
|
108147dfd1ea159fd3632ef92ccc4ab8952980c7
|
Inherit the navigation initiator when navigating instead of the parent/opener
Spec PR: https://github.com/w3c/webappsec-csp/pull/358
Bug: 905301, 894228, 836148
Change-Id: I43ada2266d42d1cd56dbe3c6dd89d115e878a83a
Reviewed-on: https://chromium-review.googlesource.com/c/1314633
Commit-Queue: Andy Paicu <[email protected]>
Reviewed-by: Mike West <[email protected]>
Cr-Commit-Position: refs/heads/master@{#610850}
|
bool ContentSecurityPolicy::IsActive() const {
return !policies_.IsEmpty();
}
|
bool ContentSecurityPolicy::IsActive() const {
return !policies_.IsEmpty();
}
|
C
|
Chrome
| 0 |
CVE-2016-5688
|
https://www.cvedetails.com/cve/CVE-2016-5688/
|
CWE-119
|
https://github.com/ImageMagick/ImageMagick/commit/aecd0ada163a4d6c769cec178955d5f3e9316f2f
|
aecd0ada163a4d6c769cec178955d5f3e9316f2f
|
Set pixel cache to undefined if any resource limit is exceeded
|
MagickExport ChannelType SetImageChannelMask(Image *image,
const ChannelType channel_mask)
{
return(SetPixelChannelMask(image,channel_mask));
}
|
MagickExport ChannelType SetImageChannelMask(Image *image,
const ChannelType channel_mask)
{
return(SetPixelChannelMask(image,channel_mask));
}
|
C
|
ImageMagick
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/648cbc15a6830523b3a4eb78d674f059bd2a7ce9
|
648cbc15a6830523b3a4eb78d674f059bd2a7ce9
|
[cros] Update OOBE network error message.
BUG=chromium-os:8172
TEST=N/A
Review URL: http://codereview.chromium.org/6303008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71595 0039d316-1c4b-4281-b951-d872f2087c98
|
void NetworkScreen::UpdateStatus(NetworkLibrary* network) {
if (!view() || !network)
return;
if (network->Connected())
ClearErrors();
if (network->ethernet_connected()) {
StopWaitingForConnection(
l10n_util::GetStringUTF16(IDS_STATUSBAR_NETWORK_DEVICE_ETHERNET));
} else if (network->wifi_connected()) {
StopWaitingForConnection(ASCIIToUTF16(network->wifi_network()->name()));
} else if (network->cellular_connected()) {
StopWaitingForConnection(ASCIIToUTF16(network->cellular_network()->name()));
} else if (network->ethernet_connecting()) {
WaitForConnection(
l10n_util::GetStringUTF16(IDS_STATUSBAR_NETWORK_DEVICE_ETHERNET));
} else if (network->wifi_connecting()) {
WaitForConnection(ASCIIToUTF16(network->wifi_network()->name()));
} else if (network->cellular_connecting()) {
WaitForConnection(ASCIIToUTF16(network->cellular_network()->name()));
} else {
StopWaitingForConnection(network_id_);
}
}
|
void NetworkScreen::UpdateStatus(NetworkLibrary* network) {
if (!view() || !network)
return;
if (network->Connected())
ClearErrors();
if (network->ethernet_connected()) {
StopWaitingForConnection(
l10n_util::GetStringUTF16(IDS_STATUSBAR_NETWORK_DEVICE_ETHERNET));
} else if (network->wifi_connected()) {
StopWaitingForConnection(ASCIIToUTF16(network->wifi_network()->name()));
} else if (network->cellular_connected()) {
StopWaitingForConnection(ASCIIToUTF16(network->cellular_network()->name()));
} else if (network->ethernet_connecting()) {
WaitForConnection(
l10n_util::GetStringUTF16(IDS_STATUSBAR_NETWORK_DEVICE_ETHERNET));
} else if (network->wifi_connecting()) {
WaitForConnection(ASCIIToUTF16(network->wifi_network()->name()));
} else if (network->cellular_connecting()) {
WaitForConnection(ASCIIToUTF16(network->cellular_network()->name()));
} else {
StopWaitingForConnection(network_id_);
}
}
|
C
|
Chrome
| 0 |
CVE-2013-0886
|
https://www.cvedetails.com/cve/CVE-2013-0886/
| null |
https://github.com/chromium/chromium/commit/18d67244984a574ba2dd8779faabc0e3e34f4b76
|
18d67244984a574ba2dd8779faabc0e3e34f4b76
|
Implement TextureImageTransportSurface using texture mailbox
This has a couple of advantages:
- allow tearing down and recreating the UI parent context without
losing the renderer contexts
- do not require a context to be able to generate textures when
creating the GLSurfaceHandle
- clearer ownership semantics that potentially allows for more
robust and easier lost context handling/thumbnailing/etc., since a texture is at
any given time owned by either: UI parent, mailbox, or
TextureImageTransportSurface
- simplify frontbuffer protection logic;
the frontbuffer textures are now owned by RWHV where they are refcounted
The TextureImageTransportSurface informs RenderWidgetHostView of the
mailbox names for the front- and backbuffer textures by
associating them with a surface_handle (1 or 2) in the AcceleratedSurfaceNew message.
During SwapBuffers() or PostSubBuffer() cycles, it then uses
produceTextureCHROMIUM() and consumeTextureCHROMIUM()
to transfer ownership between renderer and browser compositor.
RWHV sends back the surface_handle of the buffer being returned with the Swap ACK
(or 0 if no buffer is being returned in which case TextureImageTransportSurface will
allocate a new texture - note that this could be used to
simply keep textures for thumbnailing).
BUG=154815,139616
[email protected]
Review URL: https://chromiumcodereview.appspot.com/11194042
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171569 0039d316-1c4b-4281-b951-d872f2087c98
|
void RenderWidgetHostViewGuest::CopyFromCompositingSurface(
const gfx::Rect& src_subrect,
const gfx::Size& /* dst_size */,
const base::Callback<void(bool)>& callback,
skia::PlatformBitmap* output) {
NOTIMPLEMENTED();
}
|
void RenderWidgetHostViewGuest::CopyFromCompositingSurface(
const gfx::Rect& src_subrect,
const gfx::Size& /* dst_size */,
const base::Callback<void(bool)>& callback,
skia::PlatformBitmap* output) {
NOTIMPLEMENTED();
}
|
C
|
Chrome
| 0 |
CVE-2016-6911
|
https://www.cvedetails.com/cve/CVE-2016-6911/
|
CWE-125
|
https://github.com/libgd/libgd/commit/4859d69e07504d4b0a4bdf9bcb4d9e3769ca35ae
|
4859d69e07504d4b0a4bdf9bcb4d9e3769ca35ae
|
Fix invalid read in gdImageCreateFromTiffPtr()
tiff_invalid_read.tiff is corrupt, and causes an invalid read in
gdImageCreateFromTiffPtr(), but not in gdImageCreateFromTiff(). The culprit
is dynamicGetbuf(), which doesn't check for out-of-bound reads. In this case,
dynamicGetbuf() is called with a negative dp->pos, but also positive buffer
overflows have to be handled, in which case 0 has to be returned (cf. commit
75e29a9).
Fixing dynamicGetbuf() exhibits that the corrupt TIFF would still create
the image, because the return value of TIFFReadRGBAImage() is not checked.
We do that, and let createFromTiffRgba() fail if TIFFReadRGBAImage() fails.
This issue had been reported by Ibrahim El-Sayed to [email protected].
CVE-2016-6911
|
BGD_DECLARE(void) gdImageTiffCtx(gdImagePtr image, gdIOCtx *out)
{
int clipx1P, clipy1P, clipx2P, clipy2P;
int bitDepth = 24;
/* First, switch off clipping, or we'll not get all the image! */
gdImageGetClip(image, &clipx1P, &clipy1P, &clipx2P, &clipy2P);
/* use the appropriate routine depending on the bit depth of the image */
if(image->trueColor) {
bitDepth = 24;
} else if(image->colorsTotal == 2) {
bitDepth = 1;
} else {
bitDepth = 8;
}
tiffWriter(image, out, bitDepth);
/* reset clipping area to the gd image's original values */
gdImageSetClip(image, clipx1P, clipy1P, clipx2P, clipy2P);
}
|
BGD_DECLARE(void) gdImageTiffCtx(gdImagePtr image, gdIOCtx *out)
{
int clipx1P, clipy1P, clipx2P, clipy2P;
int bitDepth = 24;
/* First, switch off clipping, or we'll not get all the image! */
gdImageGetClip(image, &clipx1P, &clipy1P, &clipx2P, &clipy2P);
/* use the appropriate routine depending on the bit depth of the image */
if(image->trueColor) {
bitDepth = 24;
} else if(image->colorsTotal == 2) {
bitDepth = 1;
} else {
bitDepth = 8;
}
tiffWriter(image, out, bitDepth);
/* reset clipping area to the gd image's original values */
gdImageSetClip(image, clipx1P, clipy1P, clipx2P, clipy2P);
}
|
C
|
libgd
| 0 |
CVE-2014-0069
|
https://www.cvedetails.com/cve/CVE-2014-0069/
|
CWE-119
|
https://github.com/torvalds/linux/commit/5d81de8e8667da7135d3a32a964087c0faf5483f
|
5d81de8e8667da7135d3a32a964087c0faf5483f
|
cifs: ensure that uncached writes handle unmapped areas correctly
It's possible for userland to pass down an iovec via writev() that has a
bogus user pointer in it. If that happens and we're doing an uncached
write, then we can end up getting less bytes than we expect from the
call to iov_iter_copy_from_user. This is CVE-2014-0069
cifs_iovec_write isn't set up to handle that situation however. It'll
blindly keep chugging through the page array and not filling those pages
with anything useful. Worse yet, we'll later end up with a negative
number in wdata->tailsz, which will confuse the sending routines and
cause an oops at the very least.
Fix this by having the copy phase of cifs_iovec_write stop copying data
in this situation and send the last write as a short one. At the same
time, we want to avoid sending a zero-length write to the server, so
break out of the loop and set rc to -EFAULT if that happens. This also
allows us to handle the case where no address in the iovec is valid.
[Note: Marking this for stable on v3.4+ kernels, but kernels as old as
v2.6.38 may have a similar problem and may need similar fix]
Cc: <[email protected]> # v3.4+
Reviewed-by: Pavel Shilovsky <[email protected]>
Reported-by: Al Viro <[email protected]>
Signed-off-by: Jeff Layton <[email protected]>
Signed-off-by: Steve French <[email protected]>
|
int cifs_file_mmap(struct file *file, struct vm_area_struct *vma)
{
int rc, xid;
xid = get_xid();
rc = cifs_revalidate_file(file);
if (rc) {
cifs_dbg(FYI, "Validation prior to mmap failed, error=%d\n",
rc);
free_xid(xid);
return rc;
}
rc = generic_file_mmap(file, vma);
if (rc == 0)
vma->vm_ops = &cifs_file_vm_ops;
free_xid(xid);
return rc;
}
|
int cifs_file_mmap(struct file *file, struct vm_area_struct *vma)
{
int rc, xid;
xid = get_xid();
rc = cifs_revalidate_file(file);
if (rc) {
cifs_dbg(FYI, "Validation prior to mmap failed, error=%d\n",
rc);
free_xid(xid);
return rc;
}
rc = generic_file_mmap(file, vma);
if (rc == 0)
vma->vm_ops = &cifs_file_vm_ops;
free_xid(xid);
return rc;
}
|
C
|
linux
| 0 |
CVE-2013-1790
|
https://www.cvedetails.com/cve/CVE-2013-1790/
|
CWE-119
|
https://cgit.freedesktop.org/poppler/poppler/commit/?h=poppler-0.22&id=b1026b5978c385328f2a15a2185c599a563edf91
|
b1026b5978c385328f2a15a2185c599a563edf91
| null |
void DCTStream::dctReset(GBool unfiltered) {
if (unfiltered)
str->unfilteredReset();
else
str->reset();
progressive = interleaved = gFalse;
width = height = 0;
numComps = 0;
numQuantTables = 0;
numDCHuffTables = 0;
numACHuffTables = 0;
gotJFIFMarker = gFalse;
gotAdobeMarker = gFalse;
restartInterval = 0;
}
|
void DCTStream::dctReset(GBool unfiltered) {
if (unfiltered)
str->unfilteredReset();
else
str->reset();
progressive = interleaved = gFalse;
width = height = 0;
numComps = 0;
numQuantTables = 0;
numDCHuffTables = 0;
numACHuffTables = 0;
gotJFIFMarker = gFalse;
gotAdobeMarker = gFalse;
restartInterval = 0;
}
|
CPP
|
poppler
| 0 |
CVE-2017-5089
|
https://www.cvedetails.com/cve/CVE-2017-5089/
|
CWE-20
|
https://github.com/chromium/chromium/commit/507241119f279c31766bd41c33d6ffb6851e2d7e
|
507241119f279c31766bd41c33d6ffb6851e2d7e
|
Migrate download_protection code to new DM token class.
Migrates RetrieveDMToken calls to use the new BrowserDMToken class.
Bug: 1020296
Change-Id: Icef580e243430d73b6c1c42b273a8540277481d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1904234
Commit-Queue: Dominique Fauteux-Chapleau <[email protected]>
Reviewed-by: Tien Mai <[email protected]>
Reviewed-by: Daniel Rubery <[email protected]>
Cr-Commit-Position: refs/heads/master@{#714196}
|
void DeepScanningClientResponseToDownloadCheckResult(
const DeepScanningClientResponse& response,
DownloadCheckResult* download_result,
DownloadCheckResultReason* download_reason) {
if (response.has_malware_scan_verdict() &&
response.malware_scan_verdict().verdict() ==
MalwareDeepScanningVerdict::MALWARE) {
*download_result = DownloadCheckResult::DANGEROUS;
*download_reason = DownloadCheckResultReason::REASON_DOWNLOAD_DANGEROUS;
return;
}
if (response.has_malware_scan_verdict() &&
response.malware_scan_verdict().verdict() ==
MalwareDeepScanningVerdict::UWS) {
*download_result = DownloadCheckResult::POTENTIALLY_UNWANTED;
*download_reason =
DownloadCheckResultReason::REASON_DOWNLOAD_POTENTIALLY_UNWANTED;
return;
}
if (response.has_dlp_scan_verdict()) {
bool should_dlp_block = std::any_of(
response.dlp_scan_verdict().triggered_rules().begin(),
response.dlp_scan_verdict().triggered_rules().end(),
[](const DlpDeepScanningVerdict::TriggeredRule& rule) {
return rule.action() == DlpDeepScanningVerdict::TriggeredRule::BLOCK;
});
if (should_dlp_block) {
*download_result = DownloadCheckResult::SENSITIVE_CONTENT_BLOCK;
*download_reason =
DownloadCheckResultReason::REASON_SENSITIVE_CONTENT_BLOCK;
return;
}
bool should_dlp_warn = std::any_of(
response.dlp_scan_verdict().triggered_rules().begin(),
response.dlp_scan_verdict().triggered_rules().end(),
[](const DlpDeepScanningVerdict::TriggeredRule& rule) {
return rule.action() == DlpDeepScanningVerdict::TriggeredRule::WARN;
});
if (should_dlp_warn) {
*download_result = DownloadCheckResult::SENSITIVE_CONTENT_WARNING;
*download_reason =
DownloadCheckResultReason::REASON_SENSITIVE_CONTENT_WARNING;
return;
}
}
*download_result = DownloadCheckResult::DEEP_SCANNED_SAFE;
*download_reason = DownloadCheckResultReason::REASON_DEEP_SCANNED_SAFE;
}
|
void DeepScanningClientResponseToDownloadCheckResult(
const DeepScanningClientResponse& response,
DownloadCheckResult* download_result,
DownloadCheckResultReason* download_reason) {
if (response.has_malware_scan_verdict() &&
response.malware_scan_verdict().verdict() ==
MalwareDeepScanningVerdict::MALWARE) {
*download_result = DownloadCheckResult::DANGEROUS;
*download_reason = DownloadCheckResultReason::REASON_DOWNLOAD_DANGEROUS;
return;
}
if (response.has_malware_scan_verdict() &&
response.malware_scan_verdict().verdict() ==
MalwareDeepScanningVerdict::UWS) {
*download_result = DownloadCheckResult::POTENTIALLY_UNWANTED;
*download_reason =
DownloadCheckResultReason::REASON_DOWNLOAD_POTENTIALLY_UNWANTED;
return;
}
if (response.has_dlp_scan_verdict()) {
bool should_dlp_block = std::any_of(
response.dlp_scan_verdict().triggered_rules().begin(),
response.dlp_scan_verdict().triggered_rules().end(),
[](const DlpDeepScanningVerdict::TriggeredRule& rule) {
return rule.action() == DlpDeepScanningVerdict::TriggeredRule::BLOCK;
});
if (should_dlp_block) {
*download_result = DownloadCheckResult::SENSITIVE_CONTENT_BLOCK;
*download_reason =
DownloadCheckResultReason::REASON_SENSITIVE_CONTENT_BLOCK;
return;
}
bool should_dlp_warn = std::any_of(
response.dlp_scan_verdict().triggered_rules().begin(),
response.dlp_scan_verdict().triggered_rules().end(),
[](const DlpDeepScanningVerdict::TriggeredRule& rule) {
return rule.action() == DlpDeepScanningVerdict::TriggeredRule::WARN;
});
if (should_dlp_warn) {
*download_result = DownloadCheckResult::SENSITIVE_CONTENT_WARNING;
*download_reason =
DownloadCheckResultReason::REASON_SENSITIVE_CONTENT_WARNING;
return;
}
}
*download_result = DownloadCheckResult::DEEP_SCANNED_SAFE;
*download_reason = DownloadCheckResultReason::REASON_DEEP_SCANNED_SAFE;
}
|
C
|
Chrome
| 0 |
CVE-2012-2375
|
https://www.cvedetails.com/cve/CVE-2012-2375/
|
CWE-189
|
https://github.com/torvalds/linux/commit/20e0fa98b751facf9a1101edaefbc19c82616a68
|
20e0fa98b751facf9a1101edaefbc19c82616a68
|
Fix length of buffer copied in __nfs4_get_acl_uncached
_copy_from_pages() used to copy data from the temporary buffer to the
user passed buffer is passed the wrong size parameter when copying
data. res.acl_len contains both the bitmap and acl lenghts while
acl_len contains the acl length after adjusting for the bitmap size.
Signed-off-by: Sachin Prabhu <[email protected]>
Signed-off-by: Trond Myklebust <[email protected]>
|
nfs4_proc_create(struct inode *dir, struct dentry *dentry, struct iattr *sattr,
int flags, struct nfs_open_context *ctx)
{
struct dentry *de = dentry;
struct nfs4_state *state;
struct rpc_cred *cred = NULL;
fmode_t fmode = 0;
int status = 0;
if (ctx != NULL) {
cred = ctx->cred;
de = ctx->dentry;
fmode = ctx->mode;
}
sattr->ia_mode &= ~current_umask();
state = nfs4_do_open(dir, de, fmode, flags, sattr, cred);
d_drop(dentry);
if (IS_ERR(state)) {
status = PTR_ERR(state);
goto out;
}
d_add(dentry, igrab(state->inode));
nfs_set_verifier(dentry, nfs_save_change_attribute(dir));
if (ctx != NULL)
ctx->state = state;
else
nfs4_close_sync(state, fmode);
out:
return status;
}
|
nfs4_proc_create(struct inode *dir, struct dentry *dentry, struct iattr *sattr,
int flags, struct nfs_open_context *ctx)
{
struct dentry *de = dentry;
struct nfs4_state *state;
struct rpc_cred *cred = NULL;
fmode_t fmode = 0;
int status = 0;
if (ctx != NULL) {
cred = ctx->cred;
de = ctx->dentry;
fmode = ctx->mode;
}
sattr->ia_mode &= ~current_umask();
state = nfs4_do_open(dir, de, fmode, flags, sattr, cred);
d_drop(dentry);
if (IS_ERR(state)) {
status = PTR_ERR(state);
goto out;
}
d_add(dentry, igrab(state->inode));
nfs_set_verifier(dentry, nfs_save_change_attribute(dir));
if (ctx != NULL)
ctx->state = state;
else
nfs4_close_sync(state, fmode);
out:
return status;
}
|
C
|
linux
| 0 |
CVE-2016-10153
|
https://www.cvedetails.com/cve/CVE-2016-10153/
|
CWE-399
|
https://github.com/torvalds/linux/commit/a45f795c65b479b4ba107b6ccde29b896d51ee98
|
a45f795c65b479b4ba107b6ccde29b896d51ee98
|
libceph: introduce ceph_crypt() for in-place en/decryption
Starting with 4.9, kernel stacks may be vmalloced and therefore not
guaranteed to be physically contiguous; the new CONFIG_VMAP_STACK
option is enabled by default on x86. This makes it invalid to use
on-stack buffers with the crypto scatterlist API, as sg_set_buf()
expects a logical address and won't work with vmalloced addresses.
There isn't a different (e.g. kvec-based) crypto API we could switch
net/ceph/crypto.c to and the current scatterlist.h API isn't getting
updated to accommodate this use case. Allocating a new header and
padding for each operation is a non-starter, so do the en/decryption
in-place on a single pre-assembled (header + data + padding) heap
buffer. This is explicitly supported by the crypto API:
"... the caller may provide the same scatter/gather list for the
plaintext and cipher text. After the completion of the cipher
operation, the plaintext data is replaced with the ciphertext data
in case of an encryption and vice versa for a decryption."
Signed-off-by: Ilya Dryomov <[email protected]>
Reviewed-by: Sage Weil <[email protected]>
|
static int ceph_aes_encrypt(const void *key, int key_len,
void *dst, size_t *dst_len,
const void *src, size_t src_len)
{
struct scatterlist sg_in[2], prealloc_sg;
struct sg_table sg_out;
struct crypto_skcipher *tfm = ceph_crypto_alloc_cipher();
SKCIPHER_REQUEST_ON_STACK(req, tfm);
int ret;
char iv[AES_BLOCK_SIZE];
size_t zero_padding = (0x10 - (src_len & 0x0f));
char pad[16];
if (IS_ERR(tfm))
return PTR_ERR(tfm);
memset(pad, zero_padding, zero_padding);
*dst_len = src_len + zero_padding;
sg_init_table(sg_in, 2);
sg_set_buf(&sg_in[0], src, src_len);
sg_set_buf(&sg_in[1], pad, zero_padding);
ret = setup_sgtable(&sg_out, &prealloc_sg, dst, *dst_len);
if (ret)
goto out_tfm;
crypto_skcipher_setkey((void *)tfm, key, key_len);
memcpy(iv, aes_iv, AES_BLOCK_SIZE);
skcipher_request_set_tfm(req, tfm);
skcipher_request_set_callback(req, 0, NULL, NULL);
skcipher_request_set_crypt(req, sg_in, sg_out.sgl,
src_len + zero_padding, iv);
/*
print_hex_dump(KERN_ERR, "enc key: ", DUMP_PREFIX_NONE, 16, 1,
key, key_len, 1);
print_hex_dump(KERN_ERR, "enc src: ", DUMP_PREFIX_NONE, 16, 1,
src, src_len, 1);
print_hex_dump(KERN_ERR, "enc pad: ", DUMP_PREFIX_NONE, 16, 1,
pad, zero_padding, 1);
*/
ret = crypto_skcipher_encrypt(req);
skcipher_request_zero(req);
if (ret < 0) {
pr_err("ceph_aes_crypt failed %d\n", ret);
goto out_sg;
}
/*
print_hex_dump(KERN_ERR, "enc out: ", DUMP_PREFIX_NONE, 16, 1,
dst, *dst_len, 1);
*/
out_sg:
teardown_sgtable(&sg_out);
out_tfm:
crypto_free_skcipher(tfm);
return ret;
}
|
static int ceph_aes_encrypt(const void *key, int key_len,
void *dst, size_t *dst_len,
const void *src, size_t src_len)
{
struct scatterlist sg_in[2], prealloc_sg;
struct sg_table sg_out;
struct crypto_skcipher *tfm = ceph_crypto_alloc_cipher();
SKCIPHER_REQUEST_ON_STACK(req, tfm);
int ret;
char iv[AES_BLOCK_SIZE];
size_t zero_padding = (0x10 - (src_len & 0x0f));
char pad[16];
if (IS_ERR(tfm))
return PTR_ERR(tfm);
memset(pad, zero_padding, zero_padding);
*dst_len = src_len + zero_padding;
sg_init_table(sg_in, 2);
sg_set_buf(&sg_in[0], src, src_len);
sg_set_buf(&sg_in[1], pad, zero_padding);
ret = setup_sgtable(&sg_out, &prealloc_sg, dst, *dst_len);
if (ret)
goto out_tfm;
crypto_skcipher_setkey((void *)tfm, key, key_len);
memcpy(iv, aes_iv, AES_BLOCK_SIZE);
skcipher_request_set_tfm(req, tfm);
skcipher_request_set_callback(req, 0, NULL, NULL);
skcipher_request_set_crypt(req, sg_in, sg_out.sgl,
src_len + zero_padding, iv);
/*
print_hex_dump(KERN_ERR, "enc key: ", DUMP_PREFIX_NONE, 16, 1,
key, key_len, 1);
print_hex_dump(KERN_ERR, "enc src: ", DUMP_PREFIX_NONE, 16, 1,
src, src_len, 1);
print_hex_dump(KERN_ERR, "enc pad: ", DUMP_PREFIX_NONE, 16, 1,
pad, zero_padding, 1);
*/
ret = crypto_skcipher_encrypt(req);
skcipher_request_zero(req);
if (ret < 0) {
pr_err("ceph_aes_crypt failed %d\n", ret);
goto out_sg;
}
/*
print_hex_dump(KERN_ERR, "enc out: ", DUMP_PREFIX_NONE, 16, 1,
dst, *dst_len, 1);
*/
out_sg:
teardown_sgtable(&sg_out);
out_tfm:
crypto_free_skcipher(tfm);
return ret;
}
|
C
|
linux
| 0 |
CVE-2016-4301
|
https://www.cvedetails.com/cve/CVE-2016-4301/
|
CWE-119
|
https://github.com/libarchive/libarchive/commit/a550daeecf6bc689ade371349892ea17b5b97c77
|
a550daeecf6bc689ade371349892ea17b5b97c77
|
Fix libarchive/archive_read_support_format_mtree.c:1388:11: error: array subscript is above array bounds
|
bid_keycmp(const char *p, const char *key, ssize_t len)
{
int match_len = 0;
while (len > 0 && *p && *key) {
if (*p == *key) {
--len;
++p;
++key;
++match_len;
continue;
}
return (0);/* Not match */
}
if (*key != '\0')
return (0);/* Not match */
/* A following character should be specified characters */
if (p[0] == '=' || p[0] == ' ' || p[0] == '\t' ||
p[0] == '\n' || p[0] == '\r' ||
(p[0] == '\\' && (p[1] == '\n' || p[1] == '\r')))
return (match_len);
return (0);/* Not match */
}
|
bid_keycmp(const char *p, const char *key, ssize_t len)
{
int match_len = 0;
while (len > 0 && *p && *key) {
if (*p == *key) {
--len;
++p;
++key;
++match_len;
continue;
}
return (0);/* Not match */
}
if (*key != '\0')
return (0);/* Not match */
/* A following character should be specified characters */
if (p[0] == '=' || p[0] == ' ' || p[0] == '\t' ||
p[0] == '\n' || p[0] == '\r' ||
(p[0] == '\\' && (p[1] == '\n' || p[1] == '\r')))
return (match_len);
return (0);/* Not match */
}
|
C
|
libarchive
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/df831400bcb63db4259b5858281b1727ba972a2a
|
df831400bcb63db4259b5858281b1727ba972a2a
|
WebKit2: Support window bounce when panning.
https://bugs.webkit.org/show_bug.cgi?id=58065
<rdar://problem/9244367>
Reviewed by Adam Roben.
Make gestureDidScroll synchronous, as once we scroll, we need to know
whether or not we are at the beginning or end of the scrollable document.
If we are at either end of the scrollable document, we call the Windows 7
API to bounce the window to give an indication that you are past an end
of the document.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::gestureDidScroll): Pass a boolean for the reply, and return it.
* UIProcess/WebPageProxy.h:
* UIProcess/win/WebView.cpp:
(WebKit::WebView::WebView): Inititalize a new variable.
(WebKit::WebView::onGesture): Once we send the message to scroll, check if have gone to
an end of the document, and if we have, bounce the window.
* UIProcess/win/WebView.h:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in: GestureDidScroll is now sync.
* WebProcess/WebPage/win/WebPageWin.cpp:
(WebKit::WebPage::gestureDidScroll): When we are done scrolling, check if we have a vertical
scrollbar and if we are at the beginning or the end of the scrollable document.
git-svn-id: svn://svn.chromium.org/blink/trunk@83197 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
void WebPageProxy::willSubmitForm(uint64_t frameID, uint64_t sourceFrameID, const StringPairVector& textFieldValues, uint64_t listenerID, CoreIPC::ArgumentDecoder* arguments)
{
RefPtr<APIObject> userData;
WebContextUserMessageDecoder messageDecoder(userData, context());
if (!arguments->decode(messageDecoder))
return;
WebFrameProxy* frame = process()->webFrame(frameID);
MESSAGE_CHECK(frame);
WebFrameProxy* sourceFrame = process()->webFrame(sourceFrameID);
MESSAGE_CHECK(sourceFrame);
RefPtr<WebFormSubmissionListenerProxy> listener = frame->setUpFormSubmissionListenerProxy(listenerID);
if (!m_formClient.willSubmitForm(this, frame, sourceFrame, textFieldValues.stringPairVector(), userData.get(), listener.get()))
listener->continueSubmission();
}
|
void WebPageProxy::willSubmitForm(uint64_t frameID, uint64_t sourceFrameID, const StringPairVector& textFieldValues, uint64_t listenerID, CoreIPC::ArgumentDecoder* arguments)
{
RefPtr<APIObject> userData;
WebContextUserMessageDecoder messageDecoder(userData, context());
if (!arguments->decode(messageDecoder))
return;
WebFrameProxy* frame = process()->webFrame(frameID);
MESSAGE_CHECK(frame);
WebFrameProxy* sourceFrame = process()->webFrame(sourceFrameID);
MESSAGE_CHECK(sourceFrame);
RefPtr<WebFormSubmissionListenerProxy> listener = frame->setUpFormSubmissionListenerProxy(listenerID);
if (!m_formClient.willSubmitForm(this, frame, sourceFrame, textFieldValues.stringPairVector(), userData.get(), listener.get()))
listener->continueSubmission();
}
|
C
|
Chrome
| 0 |
CVE-2012-2895
|
https://www.cvedetails.com/cve/CVE-2012-2895/
|
CWE-119
|
https://github.com/chromium/chromium/commit/3475f5e448ddf5e48888f3d0563245cc46e3c98b
|
3475f5e448ddf5e48888f3d0563245cc46e3c98b
|
ash: Add launcher overflow bubble.
- Host a LauncherView in bubble to display overflown items;
- Mouse wheel and two-finger scroll to scroll the LauncherView in bubble in case overflow bubble is overflown;
- Fit bubble when items are added/removed;
- Keep launcher bar on screen when the bubble is shown;
BUG=128054
TEST=Verify launcher overflown items are in a bubble instead of menu.
Review URL: https://chromiumcodereview.appspot.com/10659003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146460 0039d316-1c4b-4281-b951-d872f2087c98
|
void Launcher::AddIconObserver(LauncherIconObserver* observer) {
launcher_view_->AddIconObserver(observer);
}
|
void Launcher::AddIconObserver(LauncherIconObserver* observer) {
launcher_view_->AddIconObserver(observer);
}
|
C
|
Chrome
| 0 |
CVE-2017-14604
|
https://www.cvedetails.com/cve/CVE-2017-14604/
|
CWE-20
|
https://github.com/GNOME/nautilus/commit/1630f53481f445ada0a455e9979236d31a8d3bb0
|
1630f53481f445ada0a455e9979236d31a8d3bb0
|
mime-actions: use file metadata for trusting desktop files
Currently we only trust desktop files that have the executable bit
set, and don't replace the displayed icon or the displayed name until
it's trusted, which prevents for running random programs by a malicious
desktop file.
However, the executable permission is preserved if the desktop file
comes from a compressed file.
To prevent this, add a metadata::trusted metadata to the file once the
user acknowledges the file as trusted. This adds metadata to the file,
which cannot be added unless it has access to the computer.
Also remove the SHEBANG "trusted" content we were putting inside the
desktop file, since that doesn't add more security since it can come
with the file itself.
https://bugzilla.gnome.org/show_bug.cgi?id=777991
|
choose_program (GtkDialog *message_dialog,
int response,
gpointer callback_data)
{
GtkWidget *dialog;
NautilusFile *file;
GFile *location;
ActivateParametersInstall *parameters = callback_data;
if (response != GTK_RESPONSE_ACCEPT)
{
gtk_widget_destroy (GTK_WIDGET (message_dialog));
activate_parameters_install_free (parameters);
return;
}
file = g_object_get_data (G_OBJECT (message_dialog), "mime-action:file");
g_assert (NAUTILUS_IS_FILE (file));
location = nautilus_file_get_location (file);
nautilus_file_ref (file);
/* Destroy the message dialog after ref:ing the file */
gtk_widget_destroy (GTK_WIDGET (message_dialog));
dialog = gtk_app_chooser_dialog_new (parameters->parent_window,
GTK_DIALOG_MODAL,
location);
g_object_set_data_full (G_OBJECT (dialog),
"mime-action:file",
nautilus_file_ref (file),
(GDestroyNotify) nautilus_file_unref);
gtk_widget_show (dialog);
g_signal_connect (dialog,
"response",
G_CALLBACK (open_with_response_cb),
parameters);
g_object_unref (location);
nautilus_file_unref (file);
}
|
choose_program (GtkDialog *message_dialog,
int response,
gpointer callback_data)
{
GtkWidget *dialog;
NautilusFile *file;
GFile *location;
ActivateParametersInstall *parameters = callback_data;
if (response != GTK_RESPONSE_ACCEPT)
{
gtk_widget_destroy (GTK_WIDGET (message_dialog));
activate_parameters_install_free (parameters);
return;
}
file = g_object_get_data (G_OBJECT (message_dialog), "mime-action:file");
g_assert (NAUTILUS_IS_FILE (file));
location = nautilus_file_get_location (file);
nautilus_file_ref (file);
/* Destroy the message dialog after ref:ing the file */
gtk_widget_destroy (GTK_WIDGET (message_dialog));
dialog = gtk_app_chooser_dialog_new (parameters->parent_window,
GTK_DIALOG_MODAL,
location);
g_object_set_data_full (G_OBJECT (dialog),
"mime-action:file",
nautilus_file_ref (file),
(GDestroyNotify) nautilus_file_unref);
gtk_widget_show (dialog);
g_signal_connect (dialog,
"response",
G_CALLBACK (open_with_response_cb),
parameters);
g_object_unref (location);
nautilus_file_unref (file);
}
|
C
|
nautilus
| 0 |
CVE-2016-5170
|
https://www.cvedetails.com/cve/CVE-2016-5170/
|
CWE-416
|
https://github.com/chromium/chromium/commit/c3957448cfc6e299165196a33cd954b790875fdb
|
c3957448cfc6e299165196a33cd954b790875fdb
|
Cleanup and remove dead code in SetFocusedElement
This early-out was added in:
https://crrev.com/ce8ea3446283965c7eabab592cbffe223b1cf2bc
Back then, we applied fragment focus in LayoutUpdated() which could
cause this issue. This got cleaned up in:
https://crrev.com/45236fd563e9df53dc45579be1f3d0b4784885a2
so that focus is no longer applied after layout.
+Cleanup: Goto considered harmful
Bug: 795381
Change-Id: Ifeb4d2e03e872fd48cca6720b1d4de36ad1ecbb7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1524417
Commit-Queue: David Bokan <[email protected]>
Reviewed-by: Stefan Zager <[email protected]>
Cr-Commit-Position: refs/heads/master@{#641101}
|
bool Document::NeedsLayoutTreeUpdateForNode(const Node& node,
bool ignore_adjacent_style) const {
if (!node.CanParticipateInFlatTree())
return false;
if (!NeedsLayoutTreeUpdate())
return false;
if (!node.isConnected())
return false;
if (NeedsFullLayoutTreeUpdate() || node.NeedsStyleRecalc() ||
node.NeedsStyleInvalidation())
return true;
for (const ContainerNode* ancestor = LayoutTreeBuilderTraversal::Parent(node);
ancestor; ancestor = LayoutTreeBuilderTraversal::Parent(*ancestor)) {
if (ShadowRoot* root = ancestor->GetShadowRoot()) {
if (root->NeedsStyleRecalc() || root->NeedsStyleInvalidation() ||
root->NeedsAdjacentStyleRecalc()) {
return true;
}
}
if (ancestor->NeedsStyleRecalc() || ancestor->NeedsStyleInvalidation() ||
(ancestor->NeedsAdjacentStyleRecalc() && !ignore_adjacent_style)) {
return true;
}
}
return false;
}
|
bool Document::NeedsLayoutTreeUpdateForNode(const Node& node,
bool ignore_adjacent_style) const {
if (!node.CanParticipateInFlatTree())
return false;
if (!NeedsLayoutTreeUpdate())
return false;
if (!node.isConnected())
return false;
if (NeedsFullLayoutTreeUpdate() || node.NeedsStyleRecalc() ||
node.NeedsStyleInvalidation())
return true;
for (const ContainerNode* ancestor = LayoutTreeBuilderTraversal::Parent(node);
ancestor; ancestor = LayoutTreeBuilderTraversal::Parent(*ancestor)) {
if (ShadowRoot* root = ancestor->GetShadowRoot()) {
if (root->NeedsStyleRecalc() || root->NeedsStyleInvalidation() ||
root->NeedsAdjacentStyleRecalc()) {
return true;
}
}
if (ancestor->NeedsStyleRecalc() || ancestor->NeedsStyleInvalidation() ||
(ancestor->NeedsAdjacentStyleRecalc() && !ignore_adjacent_style)) {
return true;
}
}
return false;
}
|
C
|
Chrome
| 0 |
CVE-2015-8839
|
https://www.cvedetails.com/cve/CVE-2015-8839/
|
CWE-362
|
https://github.com/torvalds/linux/commit/ea3d7209ca01da209cda6f0dea8be9cc4b7a933b
|
ea3d7209ca01da209cda6f0dea8be9cc4b7a933b
|
ext4: fix races between page faults and hole punching
Currently, page faults and hole punching are completely unsynchronized.
This can result in page fault faulting in a page into a range that we
are punching after truncate_pagecache_range() has been called and thus
we can end up with a page mapped to disk blocks that will be shortly
freed. Filesystem corruption will shortly follow. Note that the same
race is avoided for truncate by checking page fault offset against
i_size but there isn't similar mechanism available for punching holes.
Fix the problem by creating new rw semaphore i_mmap_sem in inode and
grab it for writing over truncate, hole punching, and other functions
removing blocks from extent tree and for read over page faults. We
cannot easily use i_data_sem for this since that ranks below transaction
start and we need something ranking above it so that it can be held over
the whole truncate / hole punching operation. Also remove various
workarounds we had in the code to reduce race window when page fault
could have created pages with stale mapping information.
Signed-off-by: Jan Kara <[email protected]>
Signed-off-by: Theodore Ts'o <[email protected]>
|
static int ext4_mark_dquot_dirty(struct dquot *dquot)
{
struct super_block *sb = dquot->dq_sb;
struct ext4_sb_info *sbi = EXT4_SB(sb);
/* Are we journaling quotas? */
if (ext4_has_feature_quota(sb) ||
sbi->s_qf_names[USRQUOTA] || sbi->s_qf_names[GRPQUOTA]) {
dquot_mark_dquot_dirty(dquot);
return ext4_write_dquot(dquot);
} else {
return dquot_mark_dquot_dirty(dquot);
}
}
|
static int ext4_mark_dquot_dirty(struct dquot *dquot)
{
struct super_block *sb = dquot->dq_sb;
struct ext4_sb_info *sbi = EXT4_SB(sb);
/* Are we journaling quotas? */
if (ext4_has_feature_quota(sb) ||
sbi->s_qf_names[USRQUOTA] || sbi->s_qf_names[GRPQUOTA]) {
dquot_mark_dquot_dirty(dquot);
return ext4_write_dquot(dquot);
} else {
return dquot_mark_dquot_dirty(dquot);
}
}
|
C
|
linux
| 0 |
CVE-2019-12981
|
https://www.cvedetails.com/cve/CVE-2019-12981/
|
CWE-119
|
https://github.com/libming/libming/pull/179/commits/3dc0338e4a36a3092720ebaa5b908ba3dca467d9
|
3dc0338e4a36a3092720ebaa5b908ba3dca467d9
|
SWFShape_setLeftFillStyle: prevent fill overflow
|
SWFShape_addBitmapFillStyle(SWFShape shape, SWFBitmap bitmap, byte flags)
{
SWFFillStyle fill;
if ( bitmap )
{
SWFCharacter_addDependency((SWFCharacter)shape,
(SWFCharacter)bitmap);
}
fill = newSWFBitmapFillStyle(bitmap, flags);
if(addFillStyle(shape, fill) < 0)
{
destroySWFFillStyle(fill);
return NULL;
}
return fill;
}
|
SWFShape_addBitmapFillStyle(SWFShape shape, SWFBitmap bitmap, byte flags)
{
SWFFillStyle fill;
if ( bitmap )
{
SWFCharacter_addDependency((SWFCharacter)shape,
(SWFCharacter)bitmap);
}
fill = newSWFBitmapFillStyle(bitmap, flags);
if(addFillStyle(shape, fill) < 0)
{
destroySWFFillStyle(fill);
return NULL;
}
return fill;
}
|
C
|
libming
| 0 |
CVE-2018-11376
|
https://www.cvedetails.com/cve/CVE-2018-11376/
|
CWE-125
|
https://github.com/radare/radare2/commit/1f37c04f2a762500222dda2459e6a04646feeedf
|
1f37c04f2a762500222dda2459e6a04646feeedf
|
Fix #9904 - crash in r2_hoobr_r_read_le32 (over 9000 entrypoints) and read_le oobread (#9923)
|
static int destroy(RBinFile *bf) {
int i;
ELFOBJ* eobj = bf->o->bin_obj;
if (eobj && eobj->imports_by_ord) {
for (i = 0; i < eobj->imports_by_ord_size; i++) {
RBinImport *imp = eobj->imports_by_ord[i];
if (imp) {
free (imp->name);
free (imp);
eobj->imports_by_ord[i] = NULL;
}
}
R_FREE (eobj->imports_by_ord);
}
Elf_(r_bin_elf_free) ((struct Elf_(r_bin_elf_obj_t)*)bf->o->bin_obj);
return true;
}
|
static int destroy(RBinFile *bf) {
int i;
ELFOBJ* eobj = bf->o->bin_obj;
if (eobj && eobj->imports_by_ord) {
for (i = 0; i < eobj->imports_by_ord_size; i++) {
RBinImport *imp = eobj->imports_by_ord[i];
if (imp) {
free (imp->name);
free (imp);
eobj->imports_by_ord[i] = NULL;
}
}
R_FREE (eobj->imports_by_ord);
}
Elf_(r_bin_elf_free) ((struct Elf_(r_bin_elf_obj_t)*)bf->o->bin_obj);
return true;
}
|
C
|
radare2
| 0 |
CVE-2016-5216
|
https://www.cvedetails.com/cve/CVE-2016-5216/
|
CWE-416
|
https://github.com/chromium/chromium/commit/bf6a6765d44b09c64b8c75d749efb84742a250e7
|
bf6a6765d44b09c64b8c75d749efb84742a250e7
|
[pdf] Defer page unloading in JS callback.
One of the callbacks from PDFium JavaScript into the embedder is to get the
current page number. In Chromium, this will trigger a call to
CalculateMostVisiblePage that method will determine the visible pages and unload
any non-visible pages. But, if the originating JS is on a non-visible page
we'll delete the page and annotations associated with that page. This will
cause issues as we are currently working with those objects when the JavaScript
returns.
This Cl defers the page unloading triggered by getting the most visible page
until the next event is handled by the Chromium embedder.
BUG=chromium:653090
Review-Url: https://codereview.chromium.org/2418533002
Cr-Commit-Position: refs/heads/master@{#424781}
|
int PDFiumEngine::GetNumberOfPages() {
return pages_.size();
}
|
int PDFiumEngine::GetNumberOfPages() {
return pages_.size();
}
|
C
|
Chrome
| 0 |
CVE-2016-1674
|
https://www.cvedetails.com/cve/CVE-2016-1674/
| null |
https://github.com/chromium/chromium/commit/14ff9d0cded8ae8032ef027d1f33c6666a695019
|
14ff9d0cded8ae8032ef027d1f33c6666a695019
|
[Extensions] Add more bindings access checks
BUG=598165
Review URL: https://codereview.chromium.org/1854983002
Cr-Commit-Position: refs/heads/master@{#385282}
|
void AutomationInternalCustomBindings::GetChildIDAtIndex(
const v8::FunctionCallbackInfo<v8::Value>& args) {
if (args.Length() < 3 || !args[2]->IsNumber()) {
ThrowInvalidArgumentsException(this);
return;
}
int tree_id = args[0]->Int32Value();
int node_id = args[1]->Int32Value();
const auto iter = tree_id_to_tree_cache_map_.find(tree_id);
if (iter == tree_id_to_tree_cache_map_.end())
return;
TreeCache* cache = iter->second;
if (!cache)
return;
ui::AXNode* node = cache->tree.GetFromId(node_id);
if (!node)
return;
int index = args[2]->Int32Value();
if (index < 0 || index >= node->child_count())
return;
int child_id = node->children()[index]->id();
args.GetReturnValue().Set(v8::Integer::New(GetIsolate(), child_id));
}
|
void AutomationInternalCustomBindings::GetChildIDAtIndex(
const v8::FunctionCallbackInfo<v8::Value>& args) {
if (args.Length() < 3 || !args[2]->IsNumber()) {
ThrowInvalidArgumentsException(this);
return;
}
int tree_id = args[0]->Int32Value();
int node_id = args[1]->Int32Value();
const auto iter = tree_id_to_tree_cache_map_.find(tree_id);
if (iter == tree_id_to_tree_cache_map_.end())
return;
TreeCache* cache = iter->second;
if (!cache)
return;
ui::AXNode* node = cache->tree.GetFromId(node_id);
if (!node)
return;
int index = args[2]->Int32Value();
if (index < 0 || index >= node->child_count())
return;
int child_id = node->children()[index]->id();
args.GetReturnValue().Set(v8::Integer::New(GetIsolate(), child_id));
}
|
C
|
Chrome
| 0 |
CVE-2019-11922
|
https://www.cvedetails.com/cve/CVE-2019-11922/
|
CWE-362
|
https://github.com/facebook/zstd/pull/1404/commits/3e5cdf1b6a85843e991d7d10f6a2567c15580da0
|
3e5cdf1b6a85843e991d7d10f6a2567c15580da0
|
fixed T36302429
|
static size_t ZSTD_crossEntropyCost(short const* norm, unsigned accuracyLog,
unsigned const* count, unsigned const max)
{
unsigned const shift = 8 - accuracyLog;
size_t cost = 0;
unsigned s;
assert(accuracyLog <= 8);
for (s = 0; s <= max; ++s) {
unsigned const normAcc = norm[s] != -1 ? norm[s] : 1;
unsigned const norm256 = normAcc << shift;
assert(norm256 > 0);
assert(norm256 < 256);
cost += count[s] * kInverseProbabiltyLog256[norm256];
}
return cost >> 8;
}
|
static size_t ZSTD_crossEntropyCost(short const* norm, unsigned accuracyLog,
unsigned const* count, unsigned const max)
{
unsigned const shift = 8 - accuracyLog;
size_t cost = 0;
unsigned s;
assert(accuracyLog <= 8);
for (s = 0; s <= max; ++s) {
unsigned const normAcc = norm[s] != -1 ? norm[s] : 1;
unsigned const norm256 = normAcc << shift;
assert(norm256 > 0);
assert(norm256 < 256);
cost += count[s] * kInverseProbabiltyLog256[norm256];
}
return cost >> 8;
}
|
C
|
zstd
| 0 |
CVE-2011-2350
|
https://www.cvedetails.com/cve/CVE-2011-2350/
|
CWE-20
|
https://github.com/chromium/chromium/commit/b944f670bb7a8a919daac497a4ea0536c954c201
|
b944f670bb7a8a919daac497a4ea0536c954c201
|
[JSC] Implement a helper method createNotEnoughArgumentsError()
https://bugs.webkit.org/show_bug.cgi?id=85102
Reviewed by Geoffrey Garen.
In bug 84787, kbr@ requested to avoid hard-coding
createTypeError(exec, "Not enough arguments") here and there.
This patch implements createNotEnoughArgumentsError(exec)
and uses it in JSC bindings.
c.f. a corresponding bug for V8 bindings is bug 85097.
Source/JavaScriptCore:
* runtime/Error.cpp:
(JSC::createNotEnoughArgumentsError):
(JSC):
* runtime/Error.h:
(JSC):
Source/WebCore:
Test: bindings/scripts/test/TestObj.idl
* bindings/scripts/CodeGeneratorJS.pm: Modified as described above.
(GenerateArgumentsCountCheck):
* bindings/js/JSDataViewCustom.cpp: Ditto.
(WebCore::getDataViewMember):
(WebCore::setDataViewMember):
* bindings/js/JSDeprecatedPeerConnectionCustom.cpp:
(WebCore::JSDeprecatedPeerConnectionConstructor::constructJSDeprecatedPeerConnection):
* bindings/js/JSDirectoryEntryCustom.cpp:
(WebCore::JSDirectoryEntry::getFile):
(WebCore::JSDirectoryEntry::getDirectory):
* bindings/js/JSSharedWorkerCustom.cpp:
(WebCore::JSSharedWorkerConstructor::constructJSSharedWorker):
* bindings/js/JSWebKitMutationObserverCustom.cpp:
(WebCore::JSWebKitMutationObserverConstructor::constructJSWebKitMutationObserver):
(WebCore::JSWebKitMutationObserver::observe):
* bindings/js/JSWorkerCustom.cpp:
(WebCore::JSWorkerConstructor::constructJSWorker):
* bindings/scripts/test/JS/JSFloat64Array.cpp: Updated run-bindings-tests.
(WebCore::jsFloat64ArrayPrototypeFunctionFoo):
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
(WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction):
(WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
(WebCore::jsTestCustomNamedGetterPrototypeFunctionAnotherFunction):
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::jsTestEventTargetPrototypeFunctionItem):
(WebCore::jsTestEventTargetPrototypeFunctionAddEventListener):
(WebCore::jsTestEventTargetPrototypeFunctionRemoveEventListener):
(WebCore::jsTestEventTargetPrototypeFunctionDispatchEvent):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::JSTestInterfaceConstructor::constructJSTestInterface):
(WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
(WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObjConstructor::constructJSTestObj):
(WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionIntMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg):
(WebCore::jsTestObjPrototypeFunctionMethodReturningSequence):
(WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
(WebCore::jsTestObjPrototypeFunctionSerializedValue):
(WebCore::jsTestObjPrototypeFunctionIdbKey):
(WebCore::jsTestObjPrototypeFunctionOptionsObject):
(WebCore::jsTestObjPrototypeFunctionAddEventListener):
(WebCore::jsTestObjPrototypeFunctionRemoveEventListener):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
(WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod3):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod4):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod5):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod6):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod7):
(WebCore::jsTestObjConstructorFunctionClassMethod2):
(WebCore::jsTestObjConstructorFunctionOverloadedMethod11):
(WebCore::jsTestObjConstructorFunctionOverloadedMethod12):
(WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongArray):
(WebCore::jsTestObjPrototypeFunctionConvert1):
(WebCore::jsTestObjPrototypeFunctionConvert2):
(WebCore::jsTestObjPrototypeFunctionConvert3):
(WebCore::jsTestObjPrototypeFunctionConvert4):
(WebCore::jsTestObjPrototypeFunctionConvert5):
(WebCore::jsTestObjPrototypeFunctionStrictFunction):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::JSTestSerializedScriptValueInterfaceConstructor::constructJSTestSerializedScriptValueInterface):
(WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionAcceptTransferList):
git-svn-id: svn://svn.chromium.org/blink/trunk@115536 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
void JSFloat64Array::finishCreation(JSGlobalData& globalData)
{
Base::finishCreation(globalData);
TypedArrayDescriptor descriptor(&JSFloat64Array::s_info, OBJECT_OFFSETOF(JSFloat64Array, m_storage), OBJECT_OFFSETOF(JSFloat64Array, m_storageLength));
globalData.registerTypedArrayDescriptor(impl(), descriptor);
m_storage = impl()->data();
m_storageLength = impl()->length();
ASSERT(inherits(&s_info));
}
|
void JSFloat64Array::finishCreation(JSGlobalData& globalData)
{
Base::finishCreation(globalData);
TypedArrayDescriptor descriptor(&JSFloat64Array::s_info, OBJECT_OFFSETOF(JSFloat64Array, m_storage), OBJECT_OFFSETOF(JSFloat64Array, m_storageLength));
globalData.registerTypedArrayDescriptor(impl(), descriptor);
m_storage = impl()->data();
m_storageLength = impl()->length();
ASSERT(inherits(&s_info));
}
|
C
|
Chrome
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/ee8d6fd30b022ac2c87b7a190c954e7bb3c9b21e
|
ee8d6fd30b022ac2c87b7a190c954e7bb3c9b21e
|
Clean up calls like "gfx::Rect(0, 0, size().width(), size().height()".
The caller can use the much shorter "gfx::Rect(size())", since gfx::Rect
has a constructor that just takes a Size.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/2204001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48283 0039d316-1c4b-4281-b951-d872f2087c98
|
NPError WebPluginDelegatePepper::DeviceAudioFlushContext(
NPP id,
NPDeviceContextAudio* context,
NPDeviceFlushContextCallbackPtr callback,
void* user_data) {
return NPERR_GENERIC_ERROR;
}
|
NPError WebPluginDelegatePepper::DeviceAudioFlushContext(
NPP id,
NPDeviceContextAudio* context,
NPDeviceFlushContextCallbackPtr callback,
void* user_data) {
return NPERR_GENERIC_ERROR;
}
|
C
|
Chrome
| 0 |
CVE-2013-0839
|
https://www.cvedetails.com/cve/CVE-2013-0839/
|
CWE-399
|
https://github.com/chromium/chromium/commit/dd3b6fe574edad231c01c78e4647a74c38dc4178
|
dd3b6fe574edad231c01c78e4647a74c38dc4178
|
Remove parent* arg from GDataEntry ctor.
* Remove static FromDocumentEntry from GDataEntry, GDataFile, GDataDirectory. Replace with InitFromDocumentEntry.
* Move common code from GDataFile::InitFromDocumentEntry and GDataDirectory::InitFromDocumentEntry to GDataEntry::InitFromDocumentEntry.
* Add GDataDirectoryService::FromDocumentEntry and use this everywhere.
* Make ctors of GDataFile, GDataDirectory private, so these must be created by GDataDirectoryService's CreateGDataFile and
CreateGDataDirectory. Make GDataEntry ctor protected.
BUG=141494
TEST=unit tests.
Review URL: https://chromiumcodereview.appspot.com/10854083
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151008 0039d316-1c4b-4281-b951-d872f2087c98
|
GDataFileSystem::~GDataFileSystem() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
feed_loader_->RemoveObserver(this);
documents_service_->CancelAll();
}
|
GDataFileSystem::~GDataFileSystem() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
feed_loader_->RemoveObserver(this);
documents_service_->CancelAll();
}
|
C
|
Chrome
| 0 |
CVE-2014-0182
|
https://www.cvedetails.com/cve/CVE-2014-0182/
|
CWE-119
|
https://git.qemu.org/?p=qemu.git;a=commitdiff;h=a890a2f9137ac3cf5b607649e66a6f3a5512d8dc
|
a890a2f9137ac3cf5b607649e66a6f3a5512d8dc
| null |
int virtio_queue_get_id(VirtQueue *vq)
{
VirtIODevice *vdev = vq->vdev;
assert(vq >= &vdev->vq[0] && vq < &vdev->vq[VIRTIO_PCI_QUEUE_MAX]);
return vq - &vdev->vq[0];
}
|
int virtio_queue_get_id(VirtQueue *vq)
{
VirtIODevice *vdev = vq->vdev;
assert(vq >= &vdev->vq[0] && vq < &vdev->vq[VIRTIO_PCI_QUEUE_MAX]);
return vq - &vdev->vq[0];
}
|
C
|
qemu
| 0 |
CVE-2017-9739
|
https://www.cvedetails.com/cve/CVE-2017-9739/
|
CWE-125
|
http://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=c501a58f8d5650c8ba21d447c0d6f07eafcb0f15
|
c501a58f8d5650c8ba21d447c0d6f07eafcb0f15
| null |
static void Ins_SCANCTRL( INS_ARG )
{
Int A;
/* Get Threshold */
A = (Int)(args[0] & 0xFF);
if ( A == 0xFF )
{
CUR.GS.scan_control = TRUE;
return;
}
else if ( A == 0 )
{
CUR.GS.scan_control = FALSE;
return;
}
A *= 64;
if ( (args[0] & 0x100) != 0 && CUR.metrics.pointSize <= A )
CUR.GS.scan_control = TRUE;
if ( (args[0] & 0x200) != 0 && CUR.metrics.rotated )
CUR.GS.scan_control = TRUE;
if ( (args[0] & 0x400) != 0 && CUR.metrics.stretched )
CUR.GS.scan_control = TRUE;
if ( (args[0] & 0x800) != 0 && CUR.metrics.pointSize > A )
CUR.GS.scan_control = FALSE;
if ( (args[0] & 0x1000) != 0 && CUR.metrics.rotated )
CUR.GS.scan_control = FALSE;
if ( (args[0] & 0x2000) != 0 && CUR.metrics.stretched )
CUR.GS.scan_control = FALSE;
}
|
static void Ins_SCANCTRL( INS_ARG )
{
Int A;
/* Get Threshold */
A = (Int)(args[0] & 0xFF);
if ( A == 0xFF )
{
CUR.GS.scan_control = TRUE;
return;
}
else if ( A == 0 )
{
CUR.GS.scan_control = FALSE;
return;
}
A *= 64;
if ( (args[0] & 0x100) != 0 && CUR.metrics.pointSize <= A )
CUR.GS.scan_control = TRUE;
if ( (args[0] & 0x200) != 0 && CUR.metrics.rotated )
CUR.GS.scan_control = TRUE;
if ( (args[0] & 0x400) != 0 && CUR.metrics.stretched )
CUR.GS.scan_control = TRUE;
if ( (args[0] & 0x800) != 0 && CUR.metrics.pointSize > A )
CUR.GS.scan_control = FALSE;
if ( (args[0] & 0x1000) != 0 && CUR.metrics.rotated )
CUR.GS.scan_control = FALSE;
if ( (args[0] & 0x2000) != 0 && CUR.metrics.stretched )
CUR.GS.scan_control = FALSE;
}
|
C
|
ghostscript
| 0 |
CVE-2015-8324
|
https://www.cvedetails.com/cve/CVE-2015-8324/
| null |
https://github.com/torvalds/linux/commit/744692dc059845b2a3022119871846e74d4f6e11
|
744692dc059845b2a3022119871846e74d4f6e11
|
ext4: use ext4_get_block_write in buffer write
Allocate uninitialized extent before ext4 buffer write and
convert the extent to initialized after io completes.
The purpose is to make sure an extent can only be marked
initialized after it has been written with new data so
we can safely drop the i_mutex lock in ext4 DIO read without
exposing stale data. This helps to improve multi-thread DIO
read performance on high-speed disks.
Skip the nobh and data=journal mount cases to make things simple for now.
Signed-off-by: Jiaying Zhang <[email protected]>
Signed-off-by: "Theodore Ts'o" <[email protected]>
|
static int ext4_index_trans_blocks(struct inode *inode, int nrblocks, int chunk)
{
if (!(EXT4_I(inode)->i_flags & EXT4_EXTENTS_FL))
return ext4_indirect_trans_blocks(inode, nrblocks, chunk);
return ext4_ext_index_trans_blocks(inode, nrblocks, chunk);
}
|
static int ext4_index_trans_blocks(struct inode *inode, int nrblocks, int chunk)
{
if (!(EXT4_I(inode)->i_flags & EXT4_EXTENTS_FL))
return ext4_indirect_trans_blocks(inode, nrblocks, chunk);
return ext4_ext_index_trans_blocks(inode, nrblocks, chunk);
}
|
C
|
linux
| 0 |
CVE-2016-3751
|
https://www.cvedetails.com/cve/CVE-2016-3751/
| null |
https://android.googlesource.com/platform/external/libpng/+/9d4853418ab2f754c2b63e091c29c5529b8b86ca
|
9d4853418ab2f754c2b63e091c29c5529b8b86ca
|
DO NOT MERGE Update libpng to 1.6.20
BUG:23265085
Change-Id: I85199805636d771f3597b691b63bc0bf46084833
(cherry picked from commit bbe98b40cda082024b669fa508931042eed18f82)
|
find_parameters(png_const_charp what, png_charp param, png_charp *list,
int nparams)
{
/* Parameters are separated by '\n' or ':' characters, up to nparams are
* accepted (more is an error) and the number found is returned.
*/
int i;
for (i=0; *param && i<nparams; ++i)
{
list[i] = param;
while (*++param) if (*param == '\n' || *param == ':')
{
*param++ = 0; /* Terminate last parameter */
break; /* And start a new one. */
}
}
if (*param)
{
fprintf(stderr, "--insert %s: too many parameters (%s)\n", what, param);
exit(1);
}
list[i] = NULL; /* terminates list */
return i; /* number of parameters filled in */
}
|
find_parameters(png_const_charp what, png_charp param, png_charp *list,
int nparams)
{
/* Parameters are separated by '\n' or ':' characters, up to nparams are
* accepted (more is an error) and the number found is returned.
*/
int i;
for (i=0; *param && i<nparams; ++i)
{
list[i] = param;
while (*++param) if (*param == '\n' || *param == ':')
{
*param++ = 0; /* Terminate last parameter */
break; /* And start a new one. */
}
}
if (*param)
{
fprintf(stderr, "--insert %s: too many parameters (%s)\n", what, param);
exit(1);
}
list[i] = NULL; /* terminates list */
return i; /* number of parameters filled in */
}
|
C
|
Android
| 0 |
CVE-2012-3520
|
https://www.cvedetails.com/cve/CVE-2012-3520/
|
CWE-287
|
https://github.com/torvalds/linux/commit/e0e3cea46d31d23dc40df0a49a7a2c04fe8edfea
|
e0e3cea46d31d23dc40df0a49a7a2c04fe8edfea
|
af_netlink: force credentials passing [CVE-2012-3520]
Pablo Neira Ayuso discovered that avahi and
potentially NetworkManager accept spoofed Netlink messages because of a
kernel bug. The kernel passes all-zero SCM_CREDENTIALS ancillary data
to the receiver if the sender did not provide such data, instead of not
including any such data at all or including the correct data from the
peer (as it is the case with AF_UNIX).
This bug was introduced in commit 16e572626961
(af_unix: dont send SCM_CREDENTIALS by default)
This patch forces passing credentials for netlink, as
before the regression.
Another fix would be to not add SCM_CREDENTIALS in
netlink messages if not provided by the sender, but it
might break some programs.
With help from Florian Weimer & Petr Matousek
This issue is designated as CVE-2012-3520
Signed-off-by: Eric Dumazet <[email protected]>
Cc: Petr Matousek <[email protected]>
Cc: Florian Weimer <[email protected]>
Cc: Pablo Neira Ayuso <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
int netlink_unregister_notifier(struct notifier_block *nb)
{
return atomic_notifier_chain_unregister(&netlink_chain, nb);
}
|
int netlink_unregister_notifier(struct notifier_block *nb)
{
return atomic_notifier_chain_unregister(&netlink_chain, nb);
}
|
C
|
linux
| 0 |
CVE-2013-2853
|
https://www.cvedetails.com/cve/CVE-2013-2853/
| null |
https://github.com/chromium/chromium/commit/9c18dbcb79e5f700c453d1ac01fb6d8768e4844a
|
9c18dbcb79e5f700c453d1ac01fb6d8768e4844a
|
net: don't process truncated headers on HTTPS connections.
This change causes us to not process any headers unless they are correctly
terminated with a \r\n\r\n sequence.
BUG=244260
Review URL: https://chromiumcodereview.appspot.com/15688012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202927 0039d316-1c4b-4281-b951-d872f2087c98
|
bool HttpStreamParser::IsConnectionReused() const {
ClientSocketHandle::SocketReuseType reuse_type = connection_->reuse_type();
return connection_->is_reused() ||
reuse_type == ClientSocketHandle::UNUSED_IDLE;
}
|
bool HttpStreamParser::IsConnectionReused() const {
ClientSocketHandle::SocketReuseType reuse_type = connection_->reuse_type();
return connection_->is_reused() ||
reuse_type == ClientSocketHandle::UNUSED_IDLE;
}
|
C
|
Chrome
| 0 |
CVE-2013-6644
|
https://www.cvedetails.com/cve/CVE-2013-6644/
| null |
https://github.com/chromium/chromium/commit/db93178bcaaf7e99ebb18bd51fa99b2feaf47e1f
|
db93178bcaaf7e99ebb18bd51fa99b2feaf47e1f
|
[Extensions] Add GetInstalledExtension() method to ExtensionRegistry
This CL adds GetInstalledExtension() method to ExtensionRegistry and
uses it instead of deprecated ExtensionService::GetInstalledExtension()
in chrome/browser/ui/app_list/.
Part of removing the deprecated GetInstalledExtension() call
from the ExtensionService.
BUG=489687
Review URL: https://codereview.chromium.org/1130353010
Cr-Commit-Position: refs/heads/master@{#333036}
|
void AppListControllerDelegateImpl::ActivateApp(
Profile* profile,
const extensions::Extension* extension,
AppListSource source,
int event_flags) {
LaunchApp(profile, extension, source, event_flags);
}
|
void AppListControllerDelegateImpl::ActivateApp(
Profile* profile,
const extensions::Extension* extension,
AppListSource source,
int event_flags) {
LaunchApp(profile, extension, source, event_flags);
}
|
C
|
Chrome
| 0 |
CVE-2017-9150
|
https://www.cvedetails.com/cve/CVE-2017-9150/
|
CWE-200
|
https://github.com/torvalds/linux/commit/0d0e57697f162da4aa218b5feafe614fb666db07
|
0d0e57697f162da4aa218b5feafe614fb666db07
|
bpf: don't let ldimm64 leak map addresses on unprivileged
The patch fixes two things at once:
1) It checks the env->allow_ptr_leaks and only prints the map address to
the log if we have the privileges to do so, otherwise it just dumps 0
as we would when kptr_restrict is enabled on %pK. Given the latter is
off by default and not every distro sets it, I don't want to rely on
this, hence the 0 by default for unprivileged.
2) Printing of ldimm64 in the verifier log is currently broken in that
we don't print the full immediate, but only the 32 bit part of the
first insn part for ldimm64. Thus, fix this up as well; it's okay to
access, since we verified all ldimm64 earlier already (including just
constants) through replace_map_fd_with_map_ptr().
Fixes: 1be7f75d1668 ("bpf: enable non-root eBPF programs")
Fixes: cbd357008604 ("bpf: verifier (add ability to receive verification log)")
Reported-by: Jann Horn <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-by: Alexei Starovoitov <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
static int check_cond_jmp_op(struct bpf_verifier_env *env,
struct bpf_insn *insn, int *insn_idx)
{
struct bpf_verifier_state *other_branch, *this_branch = &env->cur_state;
struct bpf_reg_state *regs = this_branch->regs, *dst_reg;
u8 opcode = BPF_OP(insn->code);
int err;
if (opcode > BPF_EXIT) {
verbose("invalid BPF_JMP opcode %x\n", opcode);
return -EINVAL;
}
if (BPF_SRC(insn->code) == BPF_X) {
if (insn->imm != 0) {
verbose("BPF_JMP uses reserved fields\n");
return -EINVAL;
}
/* check src1 operand */
err = check_reg_arg(regs, insn->src_reg, SRC_OP);
if (err)
return err;
if (is_pointer_value(env, insn->src_reg)) {
verbose("R%d pointer comparison prohibited\n",
insn->src_reg);
return -EACCES;
}
} else {
if (insn->src_reg != BPF_REG_0) {
verbose("BPF_JMP uses reserved fields\n");
return -EINVAL;
}
}
/* check src2 operand */
err = check_reg_arg(regs, insn->dst_reg, SRC_OP);
if (err)
return err;
dst_reg = ®s[insn->dst_reg];
/* detect if R == 0 where R was initialized to zero earlier */
if (BPF_SRC(insn->code) == BPF_K &&
(opcode == BPF_JEQ || opcode == BPF_JNE) &&
dst_reg->type == CONST_IMM && dst_reg->imm == insn->imm) {
if (opcode == BPF_JEQ) {
/* if (imm == imm) goto pc+off;
* only follow the goto, ignore fall-through
*/
*insn_idx += insn->off;
return 0;
} else {
/* if (imm != imm) goto pc+off;
* only follow fall-through branch, since
* that's where the program will go
*/
return 0;
}
}
other_branch = push_stack(env, *insn_idx + insn->off + 1, *insn_idx);
if (!other_branch)
return -EFAULT;
/* detect if we are comparing against a constant value so we can adjust
* our min/max values for our dst register.
*/
if (BPF_SRC(insn->code) == BPF_X) {
if (regs[insn->src_reg].type == CONST_IMM)
reg_set_min_max(&other_branch->regs[insn->dst_reg],
dst_reg, regs[insn->src_reg].imm,
opcode);
else if (dst_reg->type == CONST_IMM)
reg_set_min_max_inv(&other_branch->regs[insn->src_reg],
®s[insn->src_reg], dst_reg->imm,
opcode);
} else {
reg_set_min_max(&other_branch->regs[insn->dst_reg],
dst_reg, insn->imm, opcode);
}
/* detect if R == 0 where R is returned from bpf_map_lookup_elem() */
if (BPF_SRC(insn->code) == BPF_K &&
insn->imm == 0 && (opcode == BPF_JEQ || opcode == BPF_JNE) &&
dst_reg->type == PTR_TO_MAP_VALUE_OR_NULL) {
/* Mark all identical map registers in each branch as either
* safe or unknown depending R == 0 or R != 0 conditional.
*/
mark_map_regs(this_branch, insn->dst_reg,
opcode == BPF_JEQ ? PTR_TO_MAP_VALUE : UNKNOWN_VALUE);
mark_map_regs(other_branch, insn->dst_reg,
opcode == BPF_JEQ ? UNKNOWN_VALUE : PTR_TO_MAP_VALUE);
} else if (BPF_SRC(insn->code) == BPF_X && opcode == BPF_JGT &&
dst_reg->type == PTR_TO_PACKET &&
regs[insn->src_reg].type == PTR_TO_PACKET_END) {
find_good_pkt_pointers(this_branch, dst_reg);
} else if (BPF_SRC(insn->code) == BPF_X && opcode == BPF_JGE &&
dst_reg->type == PTR_TO_PACKET_END &&
regs[insn->src_reg].type == PTR_TO_PACKET) {
find_good_pkt_pointers(other_branch, ®s[insn->src_reg]);
} else if (is_pointer_value(env, insn->dst_reg)) {
verbose("R%d pointer comparison prohibited\n", insn->dst_reg);
return -EACCES;
}
if (log_level)
print_verifier_state(this_branch);
return 0;
}
|
static int check_cond_jmp_op(struct bpf_verifier_env *env,
struct bpf_insn *insn, int *insn_idx)
{
struct bpf_verifier_state *other_branch, *this_branch = &env->cur_state;
struct bpf_reg_state *regs = this_branch->regs, *dst_reg;
u8 opcode = BPF_OP(insn->code);
int err;
if (opcode > BPF_EXIT) {
verbose("invalid BPF_JMP opcode %x\n", opcode);
return -EINVAL;
}
if (BPF_SRC(insn->code) == BPF_X) {
if (insn->imm != 0) {
verbose("BPF_JMP uses reserved fields\n");
return -EINVAL;
}
/* check src1 operand */
err = check_reg_arg(regs, insn->src_reg, SRC_OP);
if (err)
return err;
if (is_pointer_value(env, insn->src_reg)) {
verbose("R%d pointer comparison prohibited\n",
insn->src_reg);
return -EACCES;
}
} else {
if (insn->src_reg != BPF_REG_0) {
verbose("BPF_JMP uses reserved fields\n");
return -EINVAL;
}
}
/* check src2 operand */
err = check_reg_arg(regs, insn->dst_reg, SRC_OP);
if (err)
return err;
dst_reg = ®s[insn->dst_reg];
/* detect if R == 0 where R was initialized to zero earlier */
if (BPF_SRC(insn->code) == BPF_K &&
(opcode == BPF_JEQ || opcode == BPF_JNE) &&
dst_reg->type == CONST_IMM && dst_reg->imm == insn->imm) {
if (opcode == BPF_JEQ) {
/* if (imm == imm) goto pc+off;
* only follow the goto, ignore fall-through
*/
*insn_idx += insn->off;
return 0;
} else {
/* if (imm != imm) goto pc+off;
* only follow fall-through branch, since
* that's where the program will go
*/
return 0;
}
}
other_branch = push_stack(env, *insn_idx + insn->off + 1, *insn_idx);
if (!other_branch)
return -EFAULT;
/* detect if we are comparing against a constant value so we can adjust
* our min/max values for our dst register.
*/
if (BPF_SRC(insn->code) == BPF_X) {
if (regs[insn->src_reg].type == CONST_IMM)
reg_set_min_max(&other_branch->regs[insn->dst_reg],
dst_reg, regs[insn->src_reg].imm,
opcode);
else if (dst_reg->type == CONST_IMM)
reg_set_min_max_inv(&other_branch->regs[insn->src_reg],
®s[insn->src_reg], dst_reg->imm,
opcode);
} else {
reg_set_min_max(&other_branch->regs[insn->dst_reg],
dst_reg, insn->imm, opcode);
}
/* detect if R == 0 where R is returned from bpf_map_lookup_elem() */
if (BPF_SRC(insn->code) == BPF_K &&
insn->imm == 0 && (opcode == BPF_JEQ || opcode == BPF_JNE) &&
dst_reg->type == PTR_TO_MAP_VALUE_OR_NULL) {
/* Mark all identical map registers in each branch as either
* safe or unknown depending R == 0 or R != 0 conditional.
*/
mark_map_regs(this_branch, insn->dst_reg,
opcode == BPF_JEQ ? PTR_TO_MAP_VALUE : UNKNOWN_VALUE);
mark_map_regs(other_branch, insn->dst_reg,
opcode == BPF_JEQ ? UNKNOWN_VALUE : PTR_TO_MAP_VALUE);
} else if (BPF_SRC(insn->code) == BPF_X && opcode == BPF_JGT &&
dst_reg->type == PTR_TO_PACKET &&
regs[insn->src_reg].type == PTR_TO_PACKET_END) {
find_good_pkt_pointers(this_branch, dst_reg);
} else if (BPF_SRC(insn->code) == BPF_X && opcode == BPF_JGE &&
dst_reg->type == PTR_TO_PACKET_END &&
regs[insn->src_reg].type == PTR_TO_PACKET) {
find_good_pkt_pointers(other_branch, ®s[insn->src_reg]);
} else if (is_pointer_value(env, insn->dst_reg)) {
verbose("R%d pointer comparison prohibited\n", insn->dst_reg);
return -EACCES;
}
if (log_level)
print_verifier_state(this_branch);
return 0;
}
|
C
|
linux
| 0 |
CVE-2015-3281
|
https://www.cvedetails.com/cve/CVE-2015-3281/
|
CWE-119
|
https://git.haproxy.org/?p=haproxy-1.5.git;a=commit;h=7ec765568883b2d4e5a2796adbeb492a22ec9bd4
|
7ec765568883b2d4e5a2796adbeb492a22ec9bd4
| null |
void buffer_slow_realign(struct buffer *buf)
{
int block1 = buf->o;
int block2 = 0;
/* process output data in two steps to cover wrapping */
if (block1 > buf->p - buf->data) {
block2 = buf->p - buf->data;
block1 -= block2;
}
memcpy(swap_buffer + buf->size - buf->o, bo_ptr(buf), block1);
memcpy(swap_buffer + buf->size - block2, buf->data, block2);
/* process input data in two steps to cover wrapping */
block1 = buf->i;
block2 = 0;
if (block1 > buf->data + buf->size - buf->p) {
block1 = buf->data + buf->size - buf->p;
block2 = buf->i - block1;
}
memcpy(swap_buffer, bi_ptr(buf), block1);
memcpy(swap_buffer + block1, buf->data, block2);
/* reinject changes into the buffer */
memcpy(buf->data, swap_buffer, buf->i);
memcpy(buf->data + buf->size - buf->o, swap_buffer + buf->size - buf->o, buf->o);
buf->p = buf->data;
}
|
void buffer_slow_realign(struct buffer *buf)
{
/* two possible cases :
* - the buffer is in one contiguous block, we move it in-place
* - the buffer is in two blocks, we move it via the swap_buffer
*/
if (buf->i) {
int block1 = buf->i;
int block2 = 0;
if (buf->p + buf->i > buf->data + buf->size) {
/* non-contiguous block */
block1 = buf->data + buf->size - buf->p;
block2 = buf->p + buf->i - (buf->data + buf->size);
}
if (block2)
memcpy(swap_buffer, buf->data, block2);
memmove(buf->data, buf->p, block1);
if (block2)
memcpy(buf->data + block1, swap_buffer, block2);
}
buf->p = buf->data;
}
|
C
|
haproxy
| 1 |
CVE-2012-5148
|
https://www.cvedetails.com/cve/CVE-2012-5148/
|
CWE-20
|
https://github.com/chromium/chromium/commit/e89cfcb9090e8c98129ae9160c513f504db74599
|
e89cfcb9090e8c98129ae9160c513f504db74599
|
Remove TabContents from TabStripModelObserver::TabDetachedAt.
BUG=107201
TEST=no visible change
Review URL: https://chromiumcodereview.appspot.com/11293205
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167122 0039d316-1c4b-4281-b951-d872f2087c98
|
void BrowserTabStripController::TabReplacedAt(TabStripModel* tab_strip_model,
TabContents* old_contents,
TabContents* new_contents,
int model_index) {
SetTabDataAt(new_contents->web_contents(), model_index);
}
|
void BrowserTabStripController::TabReplacedAt(TabStripModel* tab_strip_model,
TabContents* old_contents,
TabContents* new_contents,
int model_index) {
SetTabDataAt(new_contents->web_contents(), model_index);
}
|
C
|
Chrome
| 0 |
CVE-2015-6780
|
https://www.cvedetails.com/cve/CVE-2015-6780/
| null |
https://github.com/chromium/chromium/commit/f2cba0d13b3a6d76dedede66731e5ca253d3b2af
|
f2cba0d13b3a6d76dedede66731e5ca253d3b2af
|
Fix UAF in Origin Info Bubble and permission settings UI.
In addition to fixing the UAF, will this also fix the problem of the bubble
showing over the previous tab (if the bubble is open when the tab it was opened
for closes).
BUG=490492
TBR=tedchoc
Review URL: https://codereview.chromium.org/1317443002
Cr-Commit-Position: refs/heads/master@{#346023}
|
ConnectionInfoPopupAndroid::RegisterConnectionInfoPopupAndroid(
JNIEnv* env) {
return RegisterNativesImpl(env);
}
|
ConnectionInfoPopupAndroid::RegisterConnectionInfoPopupAndroid(
JNIEnv* env) {
return RegisterNativesImpl(env);
}
|
C
|
Chrome
| 0 |
CVE-2014-1710
|
https://www.cvedetails.com/cve/CVE-2014-1710/
|
CWE-119
|
https://github.com/chromium/chromium/commit/b71fc042e1124cda2ab51dfdacc2362da62779a6
|
b71fc042e1124cda2ab51dfdacc2362da62779a6
|
Add bounds validation to AsyncPixelTransfersCompletedQuery::End
BUG=351852
[email protected], [email protected]
Review URL: https://codereview.chromium.org/198253002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256723 0039d316-1c4b-4281-b951-d872f2087c98
|
bool QueryManager::EndQuery(Query* query, base::subtle::Atomic32 submit_count) {
DCHECK(query);
if (!RemovePendingQuery(query)) {
return false;
}
return query->End(submit_count);
}
|
bool QueryManager::EndQuery(Query* query, base::subtle::Atomic32 submit_count) {
DCHECK(query);
if (!RemovePendingQuery(query)) {
return false;
}
return query->End(submit_count);
}
|
C
|
Chrome
| 0 |
CVE-2017-5019
|
https://www.cvedetails.com/cve/CVE-2017-5019/
|
CWE-416
|
https://github.com/chromium/chromium/commit/f03ea5a5c2ff26e239dfd23e263b15da2d9cee93
|
f03ea5a5c2ff26e239dfd23e263b15da2d9cee93
|
Convert FrameHostMsg_DidAddMessageToConsole to Mojo.
Note: Since this required changing the test
RenderViewImplTest.DispatchBeforeUnloadCanDetachFrame, I manually
re-introduced https://crbug.com/666714 locally (the bug the test was
added for), and reran the test to confirm that it still covers the bug.
Bug: 786836
Change-Id: I110668fa6f0f261fd2ac36bb91a8d8b31c99f4f1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1526270
Commit-Queue: Lowell Manners <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Reviewed-by: Camille Lamy <[email protected]>
Cr-Commit-Position: refs/heads/master@{#653137}
|
void FillMiscNavigationParams(const CommonNavigationParams& common_params,
const CommitNavigationParams& commit_params,
blink::WebNavigationParams* navigation_params) {
navigation_params->navigation_timings = BuildNavigationTimings(
common_params.navigation_start, commit_params.navigation_timing,
common_params.input_start);
navigation_params->is_user_activated =
commit_params.was_activated == WasActivatedOption::kYes;
if (commit_params.origin_to_commit) {
navigation_params->origin_to_commit =
commit_params.origin_to_commit.value();
}
}
|
void FillMiscNavigationParams(const CommonNavigationParams& common_params,
const CommitNavigationParams& commit_params,
blink::WebNavigationParams* navigation_params) {
navigation_params->navigation_timings = BuildNavigationTimings(
common_params.navigation_start, commit_params.navigation_timing,
common_params.input_start);
navigation_params->is_user_activated =
commit_params.was_activated == WasActivatedOption::kYes;
if (commit_params.origin_to_commit) {
navigation_params->origin_to_commit =
commit_params.origin_to_commit.value();
}
}
|
C
|
Chrome
| 0 |
CVE-2015-1281
|
https://www.cvedetails.com/cve/CVE-2015-1281/
|
CWE-254
|
https://github.com/chromium/chromium/commit/dff368031150a1033a1a3c913f8857679a0279be
|
dff368031150a1033a1a3c913f8857679a0279be
|
Correctly keep track of isolates for microtask execution
BUG=487155
[email protected]
Review URL: https://codereview.chromium.org/1161823002
git-svn-id: svn://svn.chromium.org/blink/trunk@195985 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
void Document::dispose()
{
ASSERT_WITH_SECURITY_IMPLICATION(!m_deletionHasBegun);
m_docType = nullptr;
m_focusedElement = nullptr;
m_hoverNode = nullptr;
m_activeHoverElement = nullptr;
m_titleElement = nullptr;
m_documentElement = nullptr;
m_contextFeatures = ContextFeatures::defaultSwitch();
m_userActionElements.documentDidRemoveLastRef();
m_associatedFormControls.clear();
detachParser();
m_registrationContext.clear();
destroyTreeScopeData();
removeDetachedChildren();
m_formController.clear();
m_markers->clear();
m_cssCanvasElements.clear();
if (m_scriptedAnimationController)
m_scriptedAnimationController->clearDocumentPointer();
m_scriptedAnimationController.clear();
if (svgExtensions())
accessSVGExtensions().pauseAnimations();
m_lifecycle.advanceTo(DocumentLifecycle::Disposed);
DocumentLifecycleNotifier::notifyDocumentWasDisposed();
}
|
void Document::dispose()
{
ASSERT_WITH_SECURITY_IMPLICATION(!m_deletionHasBegun);
m_docType = nullptr;
m_focusedElement = nullptr;
m_hoverNode = nullptr;
m_activeHoverElement = nullptr;
m_titleElement = nullptr;
m_documentElement = nullptr;
m_contextFeatures = ContextFeatures::defaultSwitch();
m_userActionElements.documentDidRemoveLastRef();
m_associatedFormControls.clear();
detachParser();
m_registrationContext.clear();
destroyTreeScopeData();
removeDetachedChildren();
m_formController.clear();
m_markers->clear();
m_cssCanvasElements.clear();
if (m_scriptedAnimationController)
m_scriptedAnimationController->clearDocumentPointer();
m_scriptedAnimationController.clear();
if (svgExtensions())
accessSVGExtensions().pauseAnimations();
m_lifecycle.advanceTo(DocumentLifecycle::Disposed);
DocumentLifecycleNotifier::notifyDocumentWasDisposed();
}
|
C
|
Chrome
| 0 |
CVE-2016-2347
|
https://www.cvedetails.com/cve/CVE-2016-2347/
|
CWE-190
|
https://github.com/fragglet/lhasa/commit/6fcdb8f1f538b9d63e63a5fa199c5514a15d4564
|
6fcdb8f1f538b9d63e63a5fa199c5514a15d4564
|
Fix integer underflow vulnerability in L3 decode.
Marcin 'Icewall' Noga of Cisco TALOS discovered that the level 3 header
decoding routines were vulnerable to an integer underflow, if the 32-bit
header length was less than the base level 3 header length. This could
lead to an exploitable heap corruption condition.
Thanks go to Marcin Noga and Regina Wilson of Cisco TALOS for reporting
this vulnerability.
|
static int check_common_crc(LHAFileHeader *header)
{
uint16_t crc;
crc = 0;
lha_crc16_buf(&crc, header->raw_data, header->raw_data_len);
return crc == header->common_crc;
}
|
static int check_common_crc(LHAFileHeader *header)
{
uint16_t crc;
crc = 0;
lha_crc16_buf(&crc, header->raw_data, header->raw_data_len);
return crc == header->common_crc;
}
|
C
|
lhasa
| 0 |
CVE-2016-9120
|
https://www.cvedetails.com/cve/CVE-2016-9120/
|
CWE-416
|
https://github.com/torvalds/linux/commit/9590232bb4f4cc824f3425a6e1349afbe6d6d2b7
|
9590232bb4f4cc824f3425a6e1349afbe6d6d2b7
|
staging/android/ion : fix a race condition in the ion driver
There is a use-after-free problem in the ion driver.
This is caused by a race condition in the ion_ioctl()
function.
A handle has ref count of 1 and two tasks on different
cpus calls ION_IOC_FREE simultaneously.
cpu 0 cpu 1
-------------------------------------------------------
ion_handle_get_by_id()
(ref == 2)
ion_handle_get_by_id()
(ref == 3)
ion_free()
(ref == 2)
ion_handle_put()
(ref == 1)
ion_free()
(ref == 0 so ion_handle_destroy() is
called
and the handle is freed.)
ion_handle_put() is called and it
decreases the slub's next free pointer
The problem is detected as an unaligned access in the
spin lock functions since it uses load exclusive
instruction. In some cases it corrupts the slub's
free pointer which causes a mis-aligned access to the
next free pointer.(kmalloc returns a pointer like
ffffc0745b4580aa). And it causes lots of other
hard-to-debug problems.
This symptom is caused since the first member in the
ion_handle structure is the reference count and the
ion driver decrements the reference after it has been
freed.
To fix this problem client->lock mutex is extended
to protect all the codes that uses the handle.
Signed-off-by: Eun Taik Lee <[email protected]>
Reviewed-by: Laura Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
static int ion_mmap(struct dma_buf *dmabuf, struct vm_area_struct *vma)
{
struct ion_buffer *buffer = dmabuf->priv;
int ret = 0;
if (!buffer->heap->ops->map_user) {
pr_err("%s: this heap does not define a method for mapping to userspace\n",
__func__);
return -EINVAL;
}
if (ion_buffer_fault_user_mappings(buffer)) {
vma->vm_flags |= VM_IO | VM_PFNMAP | VM_DONTEXPAND |
VM_DONTDUMP;
vma->vm_private_data = buffer;
vma->vm_ops = &ion_vma_ops;
ion_vm_open(vma);
return 0;
}
if (!(buffer->flags & ION_FLAG_CACHED))
vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
mutex_lock(&buffer->lock);
/* now map it to userspace */
ret = buffer->heap->ops->map_user(buffer->heap, buffer, vma);
mutex_unlock(&buffer->lock);
if (ret)
pr_err("%s: failure mapping buffer to userspace\n",
__func__);
return ret;
}
|
static int ion_mmap(struct dma_buf *dmabuf, struct vm_area_struct *vma)
{
struct ion_buffer *buffer = dmabuf->priv;
int ret = 0;
if (!buffer->heap->ops->map_user) {
pr_err("%s: this heap does not define a method for mapping to userspace\n",
__func__);
return -EINVAL;
}
if (ion_buffer_fault_user_mappings(buffer)) {
vma->vm_flags |= VM_IO | VM_PFNMAP | VM_DONTEXPAND |
VM_DONTDUMP;
vma->vm_private_data = buffer;
vma->vm_ops = &ion_vma_ops;
ion_vm_open(vma);
return 0;
}
if (!(buffer->flags & ION_FLAG_CACHED))
vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
mutex_lock(&buffer->lock);
/* now map it to userspace */
ret = buffer->heap->ops->map_user(buffer->heap, buffer, vma);
mutex_unlock(&buffer->lock);
if (ret)
pr_err("%s: failure mapping buffer to userspace\n",
__func__);
return ret;
}
|
C
|
linux
| 0 |
CVE-2018-11598
|
https://www.cvedetails.com/cve/CVE-2018-11598/
|
CWE-125
|
https://github.com/espruino/Espruino/commit/bf4416ab9129ee3afd56739ea4e3cd0da5484b6b
|
bf4416ab9129ee3afd56739ea4e3cd0da5484b6b
|
Fix bug if using an undefined member of an object for for..in (fix #1437)
|
NO_INLINE JsVar *jspeBlockOrStatement() {
if (lex->tk=='{') {
jspeBlock();
return 0;
} else {
JsVar *v = jspeStatement();
if (lex->tk==';') JSP_ASSERT_MATCH(';');
return v;
}
}
/** Parse using current lexer until we hit the end of
* input or there was some problem. */
NO_INLINE JsVar *jspParse() {
JsVar *v = 0;
while (!JSP_SHOULDNT_PARSE && lex->tk != LEX_EOF) {
jsvUnLock(v);
v = jspeBlockOrStatement();
}
return v;
}
NO_INLINE JsVar *jspeStatementVar() {
JsVar *lastDefined = 0;
/* variable creation. TODO - we need a better way of parsing the left
* hand side. Maybe just have a flag called can_create_var that we
* set and then we parse as if we're doing a normal equals.*/
assert(lex->tk==LEX_R_VAR || lex->tk==LEX_R_LET || lex->tk==LEX_R_CONST);
jslGetNextToken();
bool hasComma = true; // for first time in loop
while (hasComma && lex->tk == LEX_ID && !jspIsInterrupted()) {
JsVar *a = 0;
if (JSP_SHOULD_EXECUTE) {
a = jspeiFindOnTop(jslGetTokenValueAsString(lex), true);
if (!a) { // out of memory
jspSetError(false);
return lastDefined;
}
}
JSP_MATCH_WITH_CLEANUP_AND_RETURN(LEX_ID, jsvUnLock(a), lastDefined);
if (lex->tk == '=') {
JsVar *var;
JSP_MATCH_WITH_CLEANUP_AND_RETURN('=', jsvUnLock(a), lastDefined);
var = jsvSkipNameAndUnLock(jspeAssignmentExpression());
if (JSP_SHOULD_EXECUTE)
jspReplaceWith(a, var);
jsvUnLock(var);
}
jsvUnLock(lastDefined);
lastDefined = a;
hasComma = lex->tk == ',';
if (hasComma) JSP_MATCH_WITH_RETURN(',', lastDefined);
}
return lastDefined;
}
NO_INLINE JsVar *jspeStatementIf() {
bool cond;
JsVar *var, *result = 0;
JSP_ASSERT_MATCH(LEX_R_IF);
JSP_MATCH('(');
var = jspeExpression();
if (JSP_SHOULDNT_PARSE) return var;
JSP_MATCH(')');
cond = JSP_SHOULD_EXECUTE && jsvGetBoolAndUnLock(jsvSkipName(var));
jsvUnLock(var);
JSP_SAVE_EXECUTE();
if (!cond) jspSetNoExecute();
JsVar *a = jspeBlockOrStatement();
if (!cond) {
jsvUnLock(a);
JSP_RESTORE_EXECUTE();
} else {
result = a;
}
if (lex->tk==LEX_R_ELSE) {
JSP_ASSERT_MATCH(LEX_R_ELSE);
JSP_SAVE_EXECUTE();
if (cond) jspSetNoExecute();
JsVar *a = jspeBlockOrStatement();
if (cond) {
jsvUnLock(a);
JSP_RESTORE_EXECUTE();
} else {
result = a;
}
}
return result;
}
NO_INLINE JsVar *jspeStatementSwitch() {
JSP_ASSERT_MATCH(LEX_R_SWITCH);
JSP_MATCH('(');
JsVar *switchOn = jspeExpression();
JSP_SAVE_EXECUTE();
bool execute = JSP_SHOULD_EXECUTE;
JSP_MATCH_WITH_CLEANUP_AND_RETURN(')', jsvUnLock(switchOn), 0);
if (!execute) { jsvUnLock(switchOn); jspeBlock(); return 0; }
JSP_MATCH_WITH_CLEANUP_AND_RETURN('{', jsvUnLock(switchOn), 0);
bool executeDefault = true;
if (execute) execInfo.execute=EXEC_NO|EXEC_IN_SWITCH;
while (lex->tk==LEX_R_CASE) {
JSP_MATCH_WITH_CLEANUP_AND_RETURN(LEX_R_CASE, jsvUnLock(switchOn), 0);
JsExecFlags oldFlags = execInfo.execute;
if (execute) execInfo.execute=EXEC_YES|EXEC_IN_SWITCH;
JsVar *test = jspeAssignmentExpression();
execInfo.execute = oldFlags|EXEC_IN_SWITCH;;
JSP_MATCH_WITH_CLEANUP_AND_RETURN(':', jsvUnLock2(switchOn, test), 0);
bool cond = false;
if (execute)
cond = jsvGetBoolAndUnLock(jsvMathsOpSkipNames(switchOn, test, LEX_TYPEEQUAL));
if (cond) executeDefault = false;
jsvUnLock(test);
if (cond && (execInfo.execute&EXEC_RUN_MASK)==EXEC_NO)
execInfo.execute=EXEC_YES|EXEC_IN_SWITCH;
while (!JSP_SHOULDNT_PARSE && lex->tk!=LEX_EOF && lex->tk!=LEX_R_CASE && lex->tk!=LEX_R_DEFAULT && lex->tk!='}')
jsvUnLock(jspeBlockOrStatement());
oldExecute |= execInfo.execute & (EXEC_ERROR_MASK|EXEC_RETURN); // copy across any errors/exceptions/returns
}
jsvUnLock(switchOn);
if (execute && (execInfo.execute&EXEC_RUN_MASK)==EXEC_BREAK) {
execInfo.execute=EXEC_YES|EXEC_IN_SWITCH;
} else {
executeDefault = true;
}
JSP_RESTORE_EXECUTE();
if (lex->tk==LEX_R_DEFAULT) {
JSP_ASSERT_MATCH(LEX_R_DEFAULT);
JSP_MATCH(':');
JSP_SAVE_EXECUTE();
if (!executeDefault) jspSetNoExecute();
else execInfo.execute |= EXEC_IN_SWITCH;
while (!JSP_SHOULDNT_PARSE && lex->tk!=LEX_EOF && lex->tk!='}')
jsvUnLock(jspeBlockOrStatement());
oldExecute |= execInfo.execute & (EXEC_ERROR_MASK|EXEC_RETURN); // copy across any errors/exceptions/returns
execInfo.execute = execInfo.execute & (JsExecFlags)~EXEC_BREAK;
JSP_RESTORE_EXECUTE();
}
JSP_MATCH('}');
|
NO_INLINE JsVar *jspeBlockOrStatement() {
if (lex->tk=='{') {
jspeBlock();
return 0;
} else {
JsVar *v = jspeStatement();
if (lex->tk==';') JSP_ASSERT_MATCH(';');
return v;
}
}
/** Parse using current lexer until we hit the end of
* input or there was some problem. */
NO_INLINE JsVar *jspParse() {
JsVar *v = 0;
while (!JSP_SHOULDNT_PARSE && lex->tk != LEX_EOF) {
jsvUnLock(v);
v = jspeBlockOrStatement();
}
return v;
}
NO_INLINE JsVar *jspeStatementVar() {
JsVar *lastDefined = 0;
/* variable creation. TODO - we need a better way of parsing the left
* hand side. Maybe just have a flag called can_create_var that we
* set and then we parse as if we're doing a normal equals.*/
assert(lex->tk==LEX_R_VAR || lex->tk==LEX_R_LET || lex->tk==LEX_R_CONST);
jslGetNextToken();
bool hasComma = true; // for first time in loop
while (hasComma && lex->tk == LEX_ID && !jspIsInterrupted()) {
JsVar *a = 0;
if (JSP_SHOULD_EXECUTE) {
a = jspeiFindOnTop(jslGetTokenValueAsString(lex), true);
if (!a) { // out of memory
jspSetError(false);
return lastDefined;
}
}
JSP_MATCH_WITH_CLEANUP_AND_RETURN(LEX_ID, jsvUnLock(a), lastDefined);
if (lex->tk == '=') {
JsVar *var;
JSP_MATCH_WITH_CLEANUP_AND_RETURN('=', jsvUnLock(a), lastDefined);
var = jsvSkipNameAndUnLock(jspeAssignmentExpression());
if (JSP_SHOULD_EXECUTE)
jspReplaceWith(a, var);
jsvUnLock(var);
}
jsvUnLock(lastDefined);
lastDefined = a;
hasComma = lex->tk == ',';
if (hasComma) JSP_MATCH_WITH_RETURN(',', lastDefined);
}
return lastDefined;
}
NO_INLINE JsVar *jspeStatementIf() {
bool cond;
JsVar *var, *result = 0;
JSP_ASSERT_MATCH(LEX_R_IF);
JSP_MATCH('(');
var = jspeExpression();
if (JSP_SHOULDNT_PARSE) return var;
JSP_MATCH(')');
cond = JSP_SHOULD_EXECUTE && jsvGetBoolAndUnLock(jsvSkipName(var));
jsvUnLock(var);
JSP_SAVE_EXECUTE();
if (!cond) jspSetNoExecute();
JsVar *a = jspeBlockOrStatement();
if (!cond) {
jsvUnLock(a);
JSP_RESTORE_EXECUTE();
} else {
result = a;
}
if (lex->tk==LEX_R_ELSE) {
JSP_ASSERT_MATCH(LEX_R_ELSE);
JSP_SAVE_EXECUTE();
if (cond) jspSetNoExecute();
JsVar *a = jspeBlockOrStatement();
if (cond) {
jsvUnLock(a);
JSP_RESTORE_EXECUTE();
} else {
result = a;
}
}
return result;
}
NO_INLINE JsVar *jspeStatementSwitch() {
JSP_ASSERT_MATCH(LEX_R_SWITCH);
JSP_MATCH('(');
JsVar *switchOn = jspeExpression();
JSP_SAVE_EXECUTE();
bool execute = JSP_SHOULD_EXECUTE;
JSP_MATCH_WITH_CLEANUP_AND_RETURN(')', jsvUnLock(switchOn), 0);
if (!execute) { jsvUnLock(switchOn); jspeBlock(); return 0; }
JSP_MATCH_WITH_CLEANUP_AND_RETURN('{', jsvUnLock(switchOn), 0);
bool executeDefault = true;
if (execute) execInfo.execute=EXEC_NO|EXEC_IN_SWITCH;
while (lex->tk==LEX_R_CASE) {
JSP_MATCH_WITH_CLEANUP_AND_RETURN(LEX_R_CASE, jsvUnLock(switchOn), 0);
JsExecFlags oldFlags = execInfo.execute;
if (execute) execInfo.execute=EXEC_YES|EXEC_IN_SWITCH;
JsVar *test = jspeAssignmentExpression();
execInfo.execute = oldFlags|EXEC_IN_SWITCH;;
JSP_MATCH_WITH_CLEANUP_AND_RETURN(':', jsvUnLock2(switchOn, test), 0);
bool cond = false;
if (execute)
cond = jsvGetBoolAndUnLock(jsvMathsOpSkipNames(switchOn, test, LEX_TYPEEQUAL));
if (cond) executeDefault = false;
jsvUnLock(test);
if (cond && (execInfo.execute&EXEC_RUN_MASK)==EXEC_NO)
execInfo.execute=EXEC_YES|EXEC_IN_SWITCH;
while (!JSP_SHOULDNT_PARSE && lex->tk!=LEX_EOF && lex->tk!=LEX_R_CASE && lex->tk!=LEX_R_DEFAULT && lex->tk!='}')
jsvUnLock(jspeBlockOrStatement());
oldExecute |= execInfo.execute & (EXEC_ERROR_MASK|EXEC_RETURN); // copy across any errors/exceptions/returns
}
jsvUnLock(switchOn);
if (execute && (execInfo.execute&EXEC_RUN_MASK)==EXEC_BREAK) {
execInfo.execute=EXEC_YES|EXEC_IN_SWITCH;
} else {
executeDefault = true;
}
JSP_RESTORE_EXECUTE();
if (lex->tk==LEX_R_DEFAULT) {
JSP_ASSERT_MATCH(LEX_R_DEFAULT);
JSP_MATCH(':');
JSP_SAVE_EXECUTE();
if (!executeDefault) jspSetNoExecute();
else execInfo.execute |= EXEC_IN_SWITCH;
while (!JSP_SHOULDNT_PARSE && lex->tk!=LEX_EOF && lex->tk!='}')
jsvUnLock(jspeBlockOrStatement());
oldExecute |= execInfo.execute & (EXEC_ERROR_MASK|EXEC_RETURN); // copy across any errors/exceptions/returns
execInfo.execute = execInfo.execute & (JsExecFlags)~EXEC_BREAK;
JSP_RESTORE_EXECUTE();
}
JSP_MATCH('}');
|
C
|
Espruino
| 0 |
CVE-2011-2350
|
https://www.cvedetails.com/cve/CVE-2011-2350/
|
CWE-20
|
https://github.com/chromium/chromium/commit/b944f670bb7a8a919daac497a4ea0536c954c201
|
b944f670bb7a8a919daac497a4ea0536c954c201
|
[JSC] Implement a helper method createNotEnoughArgumentsError()
https://bugs.webkit.org/show_bug.cgi?id=85102
Reviewed by Geoffrey Garen.
In bug 84787, kbr@ requested to avoid hard-coding
createTypeError(exec, "Not enough arguments") here and there.
This patch implements createNotEnoughArgumentsError(exec)
and uses it in JSC bindings.
c.f. a corresponding bug for V8 bindings is bug 85097.
Source/JavaScriptCore:
* runtime/Error.cpp:
(JSC::createNotEnoughArgumentsError):
(JSC):
* runtime/Error.h:
(JSC):
Source/WebCore:
Test: bindings/scripts/test/TestObj.idl
* bindings/scripts/CodeGeneratorJS.pm: Modified as described above.
(GenerateArgumentsCountCheck):
* bindings/js/JSDataViewCustom.cpp: Ditto.
(WebCore::getDataViewMember):
(WebCore::setDataViewMember):
* bindings/js/JSDeprecatedPeerConnectionCustom.cpp:
(WebCore::JSDeprecatedPeerConnectionConstructor::constructJSDeprecatedPeerConnection):
* bindings/js/JSDirectoryEntryCustom.cpp:
(WebCore::JSDirectoryEntry::getFile):
(WebCore::JSDirectoryEntry::getDirectory):
* bindings/js/JSSharedWorkerCustom.cpp:
(WebCore::JSSharedWorkerConstructor::constructJSSharedWorker):
* bindings/js/JSWebKitMutationObserverCustom.cpp:
(WebCore::JSWebKitMutationObserverConstructor::constructJSWebKitMutationObserver):
(WebCore::JSWebKitMutationObserver::observe):
* bindings/js/JSWorkerCustom.cpp:
(WebCore::JSWorkerConstructor::constructJSWorker):
* bindings/scripts/test/JS/JSFloat64Array.cpp: Updated run-bindings-tests.
(WebCore::jsFloat64ArrayPrototypeFunctionFoo):
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
(WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction):
(WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
(WebCore::jsTestCustomNamedGetterPrototypeFunctionAnotherFunction):
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::jsTestEventTargetPrototypeFunctionItem):
(WebCore::jsTestEventTargetPrototypeFunctionAddEventListener):
(WebCore::jsTestEventTargetPrototypeFunctionRemoveEventListener):
(WebCore::jsTestEventTargetPrototypeFunctionDispatchEvent):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::JSTestInterfaceConstructor::constructJSTestInterface):
(WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
(WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObjConstructor::constructJSTestObj):
(WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionIntMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg):
(WebCore::jsTestObjPrototypeFunctionMethodReturningSequence):
(WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
(WebCore::jsTestObjPrototypeFunctionSerializedValue):
(WebCore::jsTestObjPrototypeFunctionIdbKey):
(WebCore::jsTestObjPrototypeFunctionOptionsObject):
(WebCore::jsTestObjPrototypeFunctionAddEventListener):
(WebCore::jsTestObjPrototypeFunctionRemoveEventListener):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
(WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod3):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod4):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod5):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod6):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod7):
(WebCore::jsTestObjConstructorFunctionClassMethod2):
(WebCore::jsTestObjConstructorFunctionOverloadedMethod11):
(WebCore::jsTestObjConstructorFunctionOverloadedMethod12):
(WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongArray):
(WebCore::jsTestObjPrototypeFunctionConvert1):
(WebCore::jsTestObjPrototypeFunctionConvert2):
(WebCore::jsTestObjPrototypeFunctionConvert3):
(WebCore::jsTestObjPrototypeFunctionConvert4):
(WebCore::jsTestObjPrototypeFunctionConvert5):
(WebCore::jsTestObjPrototypeFunctionStrictFunction):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::JSTestSerializedScriptValueInterfaceConstructor::constructJSTestSerializedScriptValueInterface):
(WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionAcceptTransferList):
git-svn-id: svn://svn.chromium.org/blink/trunk@115536 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
static inline bool isObservable(JSTestCustomNamedGetter* jsTestCustomNamedGetter)
{
if (jsTestCustomNamedGetter->hasCustomProperties())
return true;
return false;
}
|
static inline bool isObservable(JSTestCustomNamedGetter* jsTestCustomNamedGetter)
{
if (jsTestCustomNamedGetter->hasCustomProperties())
return true;
return false;
}
|
C
|
Chrome
| 0 |
CVE-2017-9059
|
https://www.cvedetails.com/cve/CVE-2017-9059/
|
CWE-404
|
https://github.com/torvalds/linux/commit/c70422f760c120480fee4de6c38804c72aa26bc1
|
c70422f760c120480fee4de6c38804c72aa26bc1
|
Merge tag 'nfsd-4.12' of git://linux-nfs.org/~bfields/linux
Pull nfsd updates from Bruce Fields:
"Another RDMA update from Chuck Lever, and a bunch of miscellaneous
bugfixes"
* tag 'nfsd-4.12' of git://linux-nfs.org/~bfields/linux: (26 commits)
nfsd: Fix up the "supattr_exclcreat" attributes
nfsd: encoders mustn't use unitialized values in error cases
nfsd: fix undefined behavior in nfsd4_layout_verify
lockd: fix lockd shutdown race
NFSv4: Fix callback server shutdown
SUNRPC: Refactor svc_set_num_threads()
NFSv4.x/callback: Create the callback service through svc_create_pooled
lockd: remove redundant check on block
svcrdma: Clean out old XDR encoders
svcrdma: Remove the req_map cache
svcrdma: Remove unused RDMA Write completion handler
svcrdma: Reduce size of sge array in struct svc_rdma_op_ctxt
svcrdma: Clean up RPC-over-RDMA backchannel reply processing
svcrdma: Report Write/Reply chunk overruns
svcrdma: Clean up RDMA_ERROR path
svcrdma: Use rdma_rw API in RPC reply path
svcrdma: Introduce local rdma_rw API helpers
svcrdma: Clean up svc_rdma_get_inv_rkey()
svcrdma: Add helper to save pages under I/O
svcrdma: Eliminate RPCRDMA_SQ_DEPTH_MULT
...
|
check_slot_seqid(u32 seqid, u32 slot_seqid, int slot_inuse)
{
dprintk("%s enter. seqid %d slot_seqid %d\n", __func__, seqid,
slot_seqid);
/* The slot is in use, and no response has been sent. */
if (slot_inuse) {
if (seqid == slot_seqid)
return nfserr_jukebox;
else
return nfserr_seq_misordered;
}
/* Note unsigned 32-bit arithmetic handles wraparound: */
if (likely(seqid == slot_seqid + 1))
return nfs_ok;
if (seqid == slot_seqid)
return nfserr_replay_cache;
return nfserr_seq_misordered;
}
|
check_slot_seqid(u32 seqid, u32 slot_seqid, int slot_inuse)
{
dprintk("%s enter. seqid %d slot_seqid %d\n", __func__, seqid,
slot_seqid);
/* The slot is in use, and no response has been sent. */
if (slot_inuse) {
if (seqid == slot_seqid)
return nfserr_jukebox;
else
return nfserr_seq_misordered;
}
/* Note unsigned 32-bit arithmetic handles wraparound: */
if (likely(seqid == slot_seqid + 1))
return nfs_ok;
if (seqid == slot_seqid)
return nfserr_replay_cache;
return nfserr_seq_misordered;
}
|
C
|
linux
| 0 |
CVE-2017-6210
|
https://www.cvedetails.com/cve/CVE-2017-6210/
|
CWE-476
|
https://cgit.freedesktop.org/virglrenderer/commit/?id=0a5dff15912207b83018485f83e067474e818bab
|
0a5dff15912207b83018485f83e067474e818bab
| null |
static int vrend_decode_create_sub_ctx(struct vrend_decode_ctx *ctx, int length)
{
if (length != 1)
return EINVAL;
uint32_t ctx_sub_id = get_buf_entry(ctx, 1);
vrend_renderer_create_sub_ctx(ctx->grctx, ctx_sub_id);
return 0;
}
|
static int vrend_decode_create_sub_ctx(struct vrend_decode_ctx *ctx, int length)
{
if (length != 1)
return EINVAL;
uint32_t ctx_sub_id = get_buf_entry(ctx, 1);
vrend_renderer_create_sub_ctx(ctx->grctx, ctx_sub_id);
return 0;
}
|
C
|
virglrenderer
| 0 |
CVE-2017-5011
|
https://www.cvedetails.com/cve/CVE-2017-5011/
|
CWE-200
|
https://github.com/chromium/chromium/commit/eea3300239f0b53e172a320eb8de59d0bea65f27
|
eea3300239f0b53e172a320eb8de59d0bea65f27
|
DevTools: move front-end URL handling to DevToolsUIBindingds
BUG=662859
Review-Url: https://codereview.chromium.org/2607833002
Cr-Commit-Position: refs/heads/master@{#440926}
|
void DevToolsWindow::ContentsZoomChange(bool zoom_in) {
DCHECK(is_docked_);
zoom::PageZoom::Zoom(main_web_contents_, zoom_in ? content::PAGE_ZOOM_IN
: content::PAGE_ZOOM_OUT);
}
|
void DevToolsWindow::ContentsZoomChange(bool zoom_in) {
DCHECK(is_docked_);
zoom::PageZoom::Zoom(main_web_contents_, zoom_in ? content::PAGE_ZOOM_IN
: content::PAGE_ZOOM_OUT);
}
|
C
|
Chrome
| 0 |
CVE-2011-2797
|
https://www.cvedetails.com/cve/CVE-2011-2797/
|
CWE-399
|
https://github.com/chromium/chromium/commit/80742f2ffeb9e90cd85cbee27acb9f924ffebd16
|
80742f2ffeb9e90cd85cbee27acb9f924ffebd16
|
Add support for the "uploadrequired" attribute for Autofill query responses
BUG=84693
TEST=unit_tests --gtest_filter=AutofillDownloadTest.QueryAndUploadTest
Review URL: http://codereview.chromium.org/6969090
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87729 0039d316-1c4b-4281-b951-d872f2087c98
|
bool AutofillManager::FindCachedForm(const FormData& form,
FormStructure** form_structure) const {
*form_structure = NULL;
for (std::vector<FormStructure*>::const_iterator iter =
form_structures_.begin();
iter != form_structures_.end(); ++iter) {
if (**iter == form) {
*form_structure = *iter;
break;
}
}
if (!(*form_structure))
return false;
return true;
}
|
bool AutofillManager::FindCachedForm(const FormData& form,
FormStructure** form_structure) const {
*form_structure = NULL;
for (std::vector<FormStructure*>::const_iterator iter =
form_structures_.begin();
iter != form_structures_.end(); ++iter) {
if (**iter == form) {
*form_structure = *iter;
break;
}
}
if (!(*form_structure))
return false;
return true;
}
|
C
|
Chrome
| 0 |
CVE-2015-6768
|
https://www.cvedetails.com/cve/CVE-2015-6768/
|
CWE-264
|
https://github.com/chromium/chromium/commit/4c8b008f055f79e622344627fed7f820375a4f01
|
4c8b008f055f79e622344627fed7f820375a4f01
|
Change Document::detach() to RELEASE_ASSERT all subframes are gone.
BUG=556724,577105
Review URL: https://codereview.chromium.org/1667573002
Cr-Commit-Position: refs/heads/master@{#373642}
|
PassRefPtrWillBeRawPtr<ProcessingInstruction> Document::createProcessingInstruction(const String& target, const String& data, ExceptionState& exceptionState)
{
if (!isValidName(target)) {
exceptionState.throwDOMException(InvalidCharacterError, "The target provided ('" + target + "') is not a valid name.");
return nullptr;
}
if (data.contains("?>")) {
exceptionState.throwDOMException(InvalidCharacterError, "The data provided ('" + data + "') contains '?>'.");
return nullptr;
}
return ProcessingInstruction::create(*this, target, data);
}
|
PassRefPtrWillBeRawPtr<ProcessingInstruction> Document::createProcessingInstruction(const String& target, const String& data, ExceptionState& exceptionState)
{
if (!isValidName(target)) {
exceptionState.throwDOMException(InvalidCharacterError, "The target provided ('" + target + "') is not a valid name.");
return nullptr;
}
if (data.contains("?>")) {
exceptionState.throwDOMException(InvalidCharacterError, "The data provided ('" + data + "') contains '?>'.");
return nullptr;
}
return ProcessingInstruction::create(*this, target, data);
}
|
C
|
Chrome
| 0 |
CVE-2013-6626
|
https://www.cvedetails.com/cve/CVE-2013-6626/
| null |
https://github.com/chromium/chromium/commit/90fb08ed0146c9beacfd4dde98a20fc45419fff3
|
90fb08ed0146c9beacfd4dde98a20fc45419fff3
|
Cancel JavaScript dialogs when an interstitial appears.
BUG=295695
TEST=See bug for repro steps.
Review URL: https://chromiumcodereview.appspot.com/24360011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@225026 0039d316-1c4b-4281-b951-d872f2087c98
|
const string16& WebContentsImpl::GetTitle() const {
NavigationEntry* entry = controller_.GetTransientEntry();
std::string accept_languages =
GetContentClient()->browser()->GetAcceptLangs(
GetBrowserContext());
if (entry) {
return entry->GetTitleForDisplay(accept_languages);
}
WebUI* our_web_ui = render_manager_.pending_web_ui() ?
render_manager_.pending_web_ui() : render_manager_.web_ui();
if (our_web_ui) {
entry = controller_.GetVisibleEntry();
if (!(entry && entry->IsViewSourceMode())) {
const string16& title = our_web_ui->GetOverriddenTitle();
if (!title.empty())
return title;
}
}
entry = controller_.GetLastCommittedEntry();
if (entry && controller_.IsInitialNavigation())
entry = controller_.GetVisibleEntry();
if (entry) {
return entry->GetTitleForDisplay(accept_languages);
}
return page_title_when_no_navigation_entry_;
}
|
const string16& WebContentsImpl::GetTitle() const {
NavigationEntry* entry = controller_.GetTransientEntry();
std::string accept_languages =
GetContentClient()->browser()->GetAcceptLangs(
GetBrowserContext());
if (entry) {
return entry->GetTitleForDisplay(accept_languages);
}
WebUI* our_web_ui = render_manager_.pending_web_ui() ?
render_manager_.pending_web_ui() : render_manager_.web_ui();
if (our_web_ui) {
entry = controller_.GetVisibleEntry();
if (!(entry && entry->IsViewSourceMode())) {
const string16& title = our_web_ui->GetOverriddenTitle();
if (!title.empty())
return title;
}
}
entry = controller_.GetLastCommittedEntry();
if (entry && controller_.IsInitialNavigation())
entry = controller_.GetVisibleEntry();
if (entry) {
return entry->GetTitleForDisplay(accept_languages);
}
return page_title_when_no_navigation_entry_;
}
|
C
|
Chrome
| 0 |
CVE-2016-5220
|
https://www.cvedetails.com/cve/CVE-2016-5220/
|
CWE-200
|
https://github.com/chromium/chromium/commit/c6f0d22d508a551a40fc8bd7418941b77435aac3
|
c6f0d22d508a551a40fc8bd7418941b77435aac3
|
omnibox: experiment with restoring placeholder when caret shows
Shows the "Search Google or type a URL" omnibox placeholder even when
the caret (text edit cursor) is showing / when focused. views::Textfield
works this way, as does <input placeholder="">. Omnibox and the NTP's
"fakebox" are exceptions in this regard and this experiment makes this
more consistent.
[email protected]
BUG=955585
Change-Id: I23c299c0973f2feb43f7a2be3bd3425a80b06c2d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1582315
Commit-Queue: Dan Beam <[email protected]>
Reviewed-by: Tommy Li <[email protected]>
Cr-Commit-Position: refs/heads/master@{#654279}
|
void OmniboxViewViews::OnInlineAutocompleteTextCleared() {
if (location_bar_view_)
location_bar_view_->SetImeInlineAutocompletion(base::string16());
}
|
void OmniboxViewViews::OnInlineAutocompleteTextCleared() {
if (location_bar_view_)
location_bar_view_->SetImeInlineAutocompletion(base::string16());
}
|
C
|
Chrome
| 0 |
CVE-2013-4160
|
https://www.cvedetails.com/cve/CVE-2013-4160/
| null |
https://github.com/mm2/Little-CMS/commit/91c2db7f2559be504211b283bc3a2c631d6f06d9
|
91c2db7f2559be504211b283bc3a2c631d6f06d9
|
Non happy-path fixes
|
cmsBool IsDegenerated(const cmsToneCurve* g)
{
int i, Zeros = 0, Poles = 0;
int nEntries = g ->nEntries;
for (i=0; i < nEntries; i++) {
if (g ->Table16[i] == 0x0000) Zeros++;
if (g ->Table16[i] == 0xffff) Poles++;
}
if (Zeros == 1 && Poles == 1) return FALSE; // For linear tables
if (Zeros > (nEntries / 4)) return TRUE; // Degenerated, mostly zeros
if (Poles > (nEntries / 4)) return TRUE; // Degenerated, mostly poles
return FALSE;
}
|
cmsBool IsDegenerated(const cmsToneCurve* g)
{
int i, Zeros = 0, Poles = 0;
int nEntries = g ->nEntries;
for (i=0; i < nEntries; i++) {
if (g ->Table16[i] == 0x0000) Zeros++;
if (g ->Table16[i] == 0xffff) Poles++;
}
if (Zeros == 1 && Poles == 1) return FALSE; // For linear tables
if (Zeros > (nEntries / 4)) return TRUE; // Degenerated, mostly zeros
if (Poles > (nEntries / 4)) return TRUE; // Degenerated, mostly poles
return FALSE;
}
|
C
|
Little-CMS
| 0 |
CVE-2017-5044
|
https://www.cvedetails.com/cve/CVE-2017-5044/
|
CWE-119
|
https://github.com/chromium/chromium/commit/62154472bd2c43e1790dd1bd8a527c1db9118d88
|
62154472bd2c43e1790dd1bd8a527c1db9118d88
|
bluetooth: Implement getAvailability()
This change implements the getAvailability() method for
navigator.bluetooth as defined in the specification.
Bug: 707640
Change-Id: I9e9b3e7f8ea7f259e975f71cb6d9570e5f04b479
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1651516
Reviewed-by: Chris Harrelson <[email protected]>
Reviewed-by: Giovanni Ortuño Urquidi <[email protected]>
Reviewed-by: Kinuko Yasuda <[email protected]>
Commit-Queue: Ovidio de Jesús Ruiz-Henríquez <[email protected]>
Auto-Submit: Ovidio de Jesús Ruiz-Henríquez <[email protected]>
Cr-Commit-Position: refs/heads/master@{#688987}
|
void BluetoothAdapter::AddObserver(BluetoothAdapter::Observer* observer) {
DCHECK(observer);
observers_.AddObserver(observer);
}
|
void BluetoothAdapter::AddObserver(BluetoothAdapter::Observer* observer) {
DCHECK(observer);
observers_.AddObserver(observer);
}
|
C
|
Chrome
| 0 |
CVE-2017-0818
|
https://www.cvedetails.com/cve/CVE-2017-0818/
|
CWE-772
|
https://android.googlesource.com/platform/frameworks/av/+/d07f5c14e811951ff9b411ceb84e7288e0d04aaf
|
d07f5c14e811951ff9b411ceb84e7288e0d04aaf
|
Fix memory leak in OggExtractor
Test: added a temporal log and run poc
Bug: 63581671
Change-Id: I436a08e54d5e831f9fbdb33c26d15397ce1fbeba
(cherry picked from commit 63079e7c8e12cda4eb124fbe565213d30b9ea34c)
|
virtual uint64_t approxBitrate() const {
return 0;
}
|
virtual uint64_t approxBitrate() const {
return 0;
}
|
C
|
Android
| 0 |
CVE-2018-18344
|
https://www.cvedetails.com/cve/CVE-2018-18344/
|
CWE-20
|
https://github.com/chromium/chromium/commit/c71d8045ce0592cf3f4290744ab57b23c1d1b4c6
|
c71d8045ce0592cf3f4290744ab57b23c1d1b4c6
|
[DevTools] Do not allow Page.setDownloadBehavior for extensions
Bug: 866426
Change-Id: I71b672978e1a8ec779ede49da16b21198567d3a4
Reviewed-on: https://chromium-review.googlesource.com/c/1270007
Commit-Queue: Dmitry Gozman <[email protected]>
Reviewed-by: Devlin <[email protected]>
Cr-Commit-Position: refs/heads/master@{#598004}
|
Response PageHandler::SetDownloadBehavior(const std::string& behavior,
Maybe<std::string> download_path) {
if (!allow_set_download_behavior_)
return Response::Error("Not allowed.");
WebContentsImpl* web_contents = GetWebContents();
if (!web_contents)
return Response::InternalError();
if (behavior == Page::SetDownloadBehavior::BehaviorEnum::Allow &&
!download_path.isJust())
return Response::Error("downloadPath not provided");
if (behavior == Page::SetDownloadBehavior::BehaviorEnum::Default) {
DevToolsDownloadManagerHelper::RemoveFromWebContents(web_contents);
download_manager_delegate_ = nullptr;
return Response::OK();
}
content::BrowserContext* browser_context = web_contents->GetBrowserContext();
DCHECK(browser_context);
content::DownloadManager* download_manager =
content::BrowserContext::GetDownloadManager(browser_context);
download_manager_delegate_ =
DevToolsDownloadManagerDelegate::TakeOver(download_manager);
DevToolsDownloadManagerHelper::CreateForWebContents(web_contents);
DevToolsDownloadManagerHelper* download_helper =
DevToolsDownloadManagerHelper::FromWebContents(web_contents);
download_helper->SetDownloadBehavior(
DevToolsDownloadManagerHelper::DownloadBehavior::DENY);
if (behavior == Page::SetDownloadBehavior::BehaviorEnum::Allow) {
download_helper->SetDownloadBehavior(
DevToolsDownloadManagerHelper::DownloadBehavior::ALLOW);
download_helper->SetDownloadPath(download_path.fromJust());
}
return Response::OK();
}
|
Response PageHandler::SetDownloadBehavior(const std::string& behavior,
Maybe<std::string> download_path) {
WebContentsImpl* web_contents = GetWebContents();
if (!web_contents)
return Response::InternalError();
if (behavior == Page::SetDownloadBehavior::BehaviorEnum::Allow &&
!download_path.isJust())
return Response::Error("downloadPath not provided");
if (behavior == Page::SetDownloadBehavior::BehaviorEnum::Default) {
DevToolsDownloadManagerHelper::RemoveFromWebContents(web_contents);
download_manager_delegate_ = nullptr;
return Response::OK();
}
content::BrowserContext* browser_context = web_contents->GetBrowserContext();
DCHECK(browser_context);
content::DownloadManager* download_manager =
content::BrowserContext::GetDownloadManager(browser_context);
download_manager_delegate_ =
DevToolsDownloadManagerDelegate::TakeOver(download_manager);
DevToolsDownloadManagerHelper::CreateForWebContents(web_contents);
DevToolsDownloadManagerHelper* download_helper =
DevToolsDownloadManagerHelper::FromWebContents(web_contents);
download_helper->SetDownloadBehavior(
DevToolsDownloadManagerHelper::DownloadBehavior::DENY);
if (behavior == Page::SetDownloadBehavior::BehaviorEnum::Allow) {
download_helper->SetDownloadBehavior(
DevToolsDownloadManagerHelper::DownloadBehavior::ALLOW);
download_helper->SetDownloadPath(download_path.fromJust());
}
return Response::OK();
}
|
C
|
Chrome
| 1 |
CVE-2012-0037
|
https://www.cvedetails.com/cve/CVE-2012-0037/
|
CWE-200
|
https://github.com/dajobe/raptor/commit/a676f235309a59d4aa78eeffd2574ae5d341fcb0
|
a676f235309a59d4aa78eeffd2574ae5d341fcb0
|
CVE-2012-0037
Enforce entity loading policy in raptor_libxml_resolveEntity
and raptor_libxml_getEntity by checking for file URIs and network URIs.
Add RAPTOR_OPTION_LOAD_EXTERNAL_ENTITIES / loadExternalEntities for
turning on loading of XML external entity loading, disabled by default.
This affects all the parsers that use SAX2: rdfxml, rss-tag-soup (and
aliases) and rdfa.
|
raptor_rdfxml_generate_statement(raptor_parser *rdf_parser,
raptor_term *subject_term,
raptor_uri *predicate_uri,
raptor_term *object_term,
raptor_term *reified_term,
raptor_rdfxml_element* bag_element)
{
raptor_statement *statement = &rdf_parser->statement;
raptor_term* predicate_term = NULL;
int free_reified_term = 0;
if(rdf_parser->failed)
return;
#ifdef RAPTOR_DEBUG_VERBOSE
if(!subject_term)
RAPTOR_FATAL1("Statement has no subject\n");
if(!predicate_uri)
RAPTOR_FATAL1("Statement has no predicate\n");
if(!object_term)
RAPTOR_FATAL1("Statement has no object\n");
#endif
predicate_term = raptor_new_term_from_uri(rdf_parser->world, predicate_uri);
if(!predicate_term)
return;
statement->subject = subject_term;
statement->predicate = predicate_term;
statement->object = object_term;
#ifdef RAPTOR_DEBUG_VERBOSE
fprintf(stderr, "raptor_rdfxml_generate_statement: Generating statement: ");
raptor_statement_print(statement, stderr);
fputc('\n', stderr);
#endif
if(!rdf_parser->emitted_default_graph) {
raptor_parser_start_graph(rdf_parser, NULL, 0);
rdf_parser->emitted_default_graph++;
}
if(!rdf_parser->statement_handler)
goto generate_tidy;
/* Generate the statement; or is it a fact? */
(*rdf_parser->statement_handler)(rdf_parser->user_data, statement);
/* the bagID mess */
if(RAPTOR_OPTIONS_GET_NUMERIC(rdf_parser, RAPTOR_OPTION_ALLOW_BAGID) &&
bag_element && bag_element->bag) {
raptor_term* bag = bag_element->bag;
raptor_uri* bag_predicate_uri = NULL;
raptor_term* bag_predicate_term = NULL;
statement->subject = bag;
bag_element->last_bag_ordinal++;
/* new URI object */
bag_predicate_uri = raptor_new_uri_from_rdf_ordinal(rdf_parser->world,
bag_element->last_bag_ordinal);
if(!bag_predicate_uri)
goto generate_tidy;
bag_predicate_term = raptor_new_term_from_uri(rdf_parser->world,
bag_predicate_uri);
raptor_free_uri(bag_predicate_uri);
if(!bag_predicate_term)
goto generate_tidy;
statement->predicate = bag_predicate_term;
if(!reified_term || !reified_term->value.blank.string) {
unsigned char *reified_id = NULL;
/* reified_term is NULL so generate a bag ID */
reified_id = raptor_world_generate_bnodeid(rdf_parser->world);
if(!reified_id)
goto generate_tidy;
reified_term = raptor_new_term_from_blank(rdf_parser->world, reified_id);
RAPTOR_FREE(char*, reified_id);
if(!reified_term)
goto generate_tidy;
free_reified_term = 1;
}
statement->object = reified_term;
(*rdf_parser->statement_handler)(rdf_parser->user_data, statement);
if(bag_predicate_term)
raptor_free_term(bag_predicate_term);
}
/* return if is there no reified ID (that is valid) */
if(!reified_term || !reified_term->value.blank.string)
goto generate_tidy;
/* otherwise generate reified statements */
statement->subject = reified_term;
statement->predicate = RAPTOR_RDF_type_term(rdf_parser->world);
statement->object = RAPTOR_RDF_Statement_term(rdf_parser->world);
(*rdf_parser->statement_handler)(rdf_parser->user_data, statement);
/* statement->subject = reified_term; */
statement->predicate = RAPTOR_RDF_subject_term(rdf_parser->world);
statement->object = subject_term;
(*rdf_parser->statement_handler)(rdf_parser->user_data, statement);
/* statement->subject = reified_term; */
statement->predicate = RAPTOR_RDF_predicate_term(rdf_parser->world);
statement->object = predicate_term;
(*rdf_parser->statement_handler)(rdf_parser->user_data, statement);
/* statement->subject = reified_term; */
statement->predicate = RAPTOR_RDF_object_term(rdf_parser->world);
statement->object = object_term;
(*rdf_parser->statement_handler)(rdf_parser->user_data, statement);
generate_tidy:
/* Tidy up things allocated here */
if(predicate_term)
raptor_free_term(predicate_term);
if(free_reified_term && reified_term)
raptor_free_term(reified_term);
}
|
raptor_rdfxml_generate_statement(raptor_parser *rdf_parser,
raptor_term *subject_term,
raptor_uri *predicate_uri,
raptor_term *object_term,
raptor_term *reified_term,
raptor_rdfxml_element* bag_element)
{
raptor_statement *statement = &rdf_parser->statement;
raptor_term* predicate_term = NULL;
int free_reified_term = 0;
if(rdf_parser->failed)
return;
#ifdef RAPTOR_DEBUG_VERBOSE
if(!subject_term)
RAPTOR_FATAL1("Statement has no subject\n");
if(!predicate_uri)
RAPTOR_FATAL1("Statement has no predicate\n");
if(!object_term)
RAPTOR_FATAL1("Statement has no object\n");
#endif
predicate_term = raptor_new_term_from_uri(rdf_parser->world, predicate_uri);
if(!predicate_term)
return;
statement->subject = subject_term;
statement->predicate = predicate_term;
statement->object = object_term;
#ifdef RAPTOR_DEBUG_VERBOSE
fprintf(stderr, "raptor_rdfxml_generate_statement: Generating statement: ");
raptor_statement_print(statement, stderr);
fputc('\n', stderr);
#endif
if(!rdf_parser->emitted_default_graph) {
raptor_parser_start_graph(rdf_parser, NULL, 0);
rdf_parser->emitted_default_graph++;
}
if(!rdf_parser->statement_handler)
goto generate_tidy;
/* Generate the statement; or is it a fact? */
(*rdf_parser->statement_handler)(rdf_parser->user_data, statement);
/* the bagID mess */
if(RAPTOR_OPTIONS_GET_NUMERIC(rdf_parser, RAPTOR_OPTION_ALLOW_BAGID) &&
bag_element && bag_element->bag) {
raptor_term* bag = bag_element->bag;
raptor_uri* bag_predicate_uri = NULL;
raptor_term* bag_predicate_term = NULL;
statement->subject = bag;
bag_element->last_bag_ordinal++;
/* new URI object */
bag_predicate_uri = raptor_new_uri_from_rdf_ordinal(rdf_parser->world,
bag_element->last_bag_ordinal);
if(!bag_predicate_uri)
goto generate_tidy;
bag_predicate_term = raptor_new_term_from_uri(rdf_parser->world,
bag_predicate_uri);
raptor_free_uri(bag_predicate_uri);
if(!bag_predicate_term)
goto generate_tidy;
statement->predicate = bag_predicate_term;
if(!reified_term || !reified_term->value.blank.string) {
unsigned char *reified_id = NULL;
/* reified_term is NULL so generate a bag ID */
reified_id = raptor_world_generate_bnodeid(rdf_parser->world);
if(!reified_id)
goto generate_tidy;
reified_term = raptor_new_term_from_blank(rdf_parser->world, reified_id);
RAPTOR_FREE(char*, reified_id);
if(!reified_term)
goto generate_tidy;
free_reified_term = 1;
}
statement->object = reified_term;
(*rdf_parser->statement_handler)(rdf_parser->user_data, statement);
if(bag_predicate_term)
raptor_free_term(bag_predicate_term);
}
/* return if is there no reified ID (that is valid) */
if(!reified_term || !reified_term->value.blank.string)
goto generate_tidy;
/* otherwise generate reified statements */
statement->subject = reified_term;
statement->predicate = RAPTOR_RDF_type_term(rdf_parser->world);
statement->object = RAPTOR_RDF_Statement_term(rdf_parser->world);
(*rdf_parser->statement_handler)(rdf_parser->user_data, statement);
/* statement->subject = reified_term; */
statement->predicate = RAPTOR_RDF_subject_term(rdf_parser->world);
statement->object = subject_term;
(*rdf_parser->statement_handler)(rdf_parser->user_data, statement);
/* statement->subject = reified_term; */
statement->predicate = RAPTOR_RDF_predicate_term(rdf_parser->world);
statement->object = predicate_term;
(*rdf_parser->statement_handler)(rdf_parser->user_data, statement);
/* statement->subject = reified_term; */
statement->predicate = RAPTOR_RDF_object_term(rdf_parser->world);
statement->object = object_term;
(*rdf_parser->statement_handler)(rdf_parser->user_data, statement);
generate_tidy:
/* Tidy up things allocated here */
if(predicate_term)
raptor_free_term(predicate_term);
if(free_reified_term && reified_term)
raptor_free_term(reified_term);
}
|
C
|
raptor
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/1161a49d663dd395bd639549c2dfe7324f847938
|
1161a49d663dd395bd639549c2dfe7324f847938
|
Don't populate URL data in WebDropData when dragging files.
This is considered a potential security issue as well, since it leaks
filesystem paths.
BUG=332579
Review URL: https://codereview.chromium.org/135633002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244538 0039d316-1c4b-4281-b951-d872f2087c98
|
void TabStrip::StartResizeLayoutTabsFromTouchTimer() {
resize_layout_timer_.Stop();
resize_layout_timer_.Start(
FROM_HERE, base::TimeDelta::FromMilliseconds(kTouchResizeLayoutTimeMS),
this, &TabStrip::ResizeLayoutTabsFromTouch);
}
|
void TabStrip::StartResizeLayoutTabsFromTouchTimer() {
resize_layout_timer_.Stop();
resize_layout_timer_.Start(
FROM_HERE, base::TimeDelta::FromMilliseconds(kTouchResizeLayoutTimeMS),
this, &TabStrip::ResizeLayoutTabsFromTouch);
}
|
C
|
Chrome
| 0 |
CVE-2019-7308
|
https://www.cvedetails.com/cve/CVE-2019-7308/
|
CWE-189
|
https://github.com/torvalds/linux/commit/d3bd7413e0ca40b60cf60d4003246d067cafdeda
|
d3bd7413e0ca40b60cf60d4003246d067cafdeda
|
bpf: fix sanitation of alu op with pointer / scalar type from different paths
While 979d63d50c0c ("bpf: prevent out of bounds speculation on pointer
arithmetic") took care of rejecting alu op on pointer when e.g. pointer
came from two different map values with different map properties such as
value size, Jann reported that a case was not covered yet when a given
alu op is used in both "ptr_reg += reg" and "numeric_reg += reg" from
different branches where we would incorrectly try to sanitize based
on the pointer's limit. Catch this corner case and reject the program
instead.
Fixes: 979d63d50c0c ("bpf: prevent out of bounds speculation on pointer arithmetic")
Reported-by: Jann Horn <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-by: Alexei Starovoitov <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>
|
static int check_func_call(struct bpf_verifier_env *env, struct bpf_insn *insn,
int *insn_idx)
{
struct bpf_verifier_state *state = env->cur_state;
struct bpf_func_state *caller, *callee;
int i, err, subprog, target_insn;
if (state->curframe + 1 >= MAX_CALL_FRAMES) {
verbose(env, "the call stack of %d frames is too deep\n",
state->curframe + 2);
return -E2BIG;
}
target_insn = *insn_idx + insn->imm;
subprog = find_subprog(env, target_insn + 1);
if (subprog < 0) {
verbose(env, "verifier bug. No program starts at insn %d\n",
target_insn + 1);
return -EFAULT;
}
caller = state->frame[state->curframe];
if (state->frame[state->curframe + 1]) {
verbose(env, "verifier bug. Frame %d already allocated\n",
state->curframe + 1);
return -EFAULT;
}
callee = kzalloc(sizeof(*callee), GFP_KERNEL);
if (!callee)
return -ENOMEM;
state->frame[state->curframe + 1] = callee;
/* callee cannot access r0, r6 - r9 for reading and has to write
* into its own stack before reading from it.
* callee can read/write into caller's stack
*/
init_func_state(env, callee,
/* remember the callsite, it will be used by bpf_exit */
*insn_idx /* callsite */,
state->curframe + 1 /* frameno within this callchain */,
subprog /* subprog number within this prog */);
/* Transfer references to the callee */
err = transfer_reference_state(callee, caller);
if (err)
return err;
/* copy r1 - r5 args that callee can access. The copy includes parent
* pointers, which connects us up to the liveness chain
*/
for (i = BPF_REG_1; i <= BPF_REG_5; i++)
callee->regs[i] = caller->regs[i];
/* after the call registers r0 - r5 were scratched */
for (i = 0; i < CALLER_SAVED_REGS; i++) {
mark_reg_not_init(env, caller->regs, caller_saved[i]);
check_reg_arg(env, caller_saved[i], DST_OP_NO_MARK);
}
/* only increment it after check_reg_arg() finished */
state->curframe++;
/* and go analyze first insn of the callee */
*insn_idx = target_insn;
if (env->log.level) {
verbose(env, "caller:\n");
print_verifier_state(env, caller);
verbose(env, "callee:\n");
print_verifier_state(env, callee);
}
return 0;
}
|
static int check_func_call(struct bpf_verifier_env *env, struct bpf_insn *insn,
int *insn_idx)
{
struct bpf_verifier_state *state = env->cur_state;
struct bpf_func_state *caller, *callee;
int i, err, subprog, target_insn;
if (state->curframe + 1 >= MAX_CALL_FRAMES) {
verbose(env, "the call stack of %d frames is too deep\n",
state->curframe + 2);
return -E2BIG;
}
target_insn = *insn_idx + insn->imm;
subprog = find_subprog(env, target_insn + 1);
if (subprog < 0) {
verbose(env, "verifier bug. No program starts at insn %d\n",
target_insn + 1);
return -EFAULT;
}
caller = state->frame[state->curframe];
if (state->frame[state->curframe + 1]) {
verbose(env, "verifier bug. Frame %d already allocated\n",
state->curframe + 1);
return -EFAULT;
}
callee = kzalloc(sizeof(*callee), GFP_KERNEL);
if (!callee)
return -ENOMEM;
state->frame[state->curframe + 1] = callee;
/* callee cannot access r0, r6 - r9 for reading and has to write
* into its own stack before reading from it.
* callee can read/write into caller's stack
*/
init_func_state(env, callee,
/* remember the callsite, it will be used by bpf_exit */
*insn_idx /* callsite */,
state->curframe + 1 /* frameno within this callchain */,
subprog /* subprog number within this prog */);
/* Transfer references to the callee */
err = transfer_reference_state(callee, caller);
if (err)
return err;
/* copy r1 - r5 args that callee can access. The copy includes parent
* pointers, which connects us up to the liveness chain
*/
for (i = BPF_REG_1; i <= BPF_REG_5; i++)
callee->regs[i] = caller->regs[i];
/* after the call registers r0 - r5 were scratched */
for (i = 0; i < CALLER_SAVED_REGS; i++) {
mark_reg_not_init(env, caller->regs, caller_saved[i]);
check_reg_arg(env, caller_saved[i], DST_OP_NO_MARK);
}
/* only increment it after check_reg_arg() finished */
state->curframe++;
/* and go analyze first insn of the callee */
*insn_idx = target_insn;
if (env->log.level) {
verbose(env, "caller:\n");
print_verifier_state(env, caller);
verbose(env, "callee:\n");
print_verifier_state(env, callee);
}
return 0;
}
|
C
|
linux
| 0 |
null | null | null |
https://github.com/chromium/chromium/commit/1a113d35a19c0ed6500fb5c0acdc35730617fb3f
|
1a113d35a19c0ed6500fb5c0acdc35730617fb3f
|
Gracefully deal with clearing content settings for unregistered extensions.
BUG=128652
Review URL: https://chromiumcodereview.appspot.com/10907093
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155341 0039d316-1c4b-4281-b951-d872f2087c98
|
void ContentSettingsStore::RegisterExtension(
const std::string& ext_id,
const base::Time& install_time,
bool is_enabled) {
base::AutoLock lock(lock_);
ExtensionEntryMap::iterator i = FindEntry(ext_id);
if (i != entries_.end()) {
delete i->second;
entries_.erase(i);
}
ExtensionEntry* entry = new ExtensionEntry;
entry->id = ext_id;
entry->enabled = is_enabled;
entries_.insert(std::make_pair(install_time, entry));
}
|
void ContentSettingsStore::RegisterExtension(
const std::string& ext_id,
const base::Time& install_time,
bool is_enabled) {
base::AutoLock lock(lock_);
ExtensionEntryMap::iterator i = FindEntry(ext_id);
if (i != entries_.end()) {
delete i->second;
entries_.erase(i);
}
ExtensionEntry* entry = new ExtensionEntry;
entry->id = ext_id;
entry->enabled = is_enabled;
entries_.insert(std::make_pair(install_time, entry));
}
|
C
|
Chrome
| 0 |
CVE-2016-1654
|
https://www.cvedetails.com/cve/CVE-2016-1654/
|
CWE-20
|
https://github.com/chromium/chromium/commit/8355de453bb4014b74b2db5d7ca38c5664d65d83
|
8355de453bb4014b74b2db5d7ca38c5664d65d83
|
Use an opaque URL rather than an empty URL for request's site for cookies.
Apparently this makes a big difference to the cookie settings backend.
Bug: 881715
Change-Id: Id87fa0c6a858bae6a3f8fff4d6af3f974b00d5e4
Reviewed-on: https://chromium-review.googlesource.com/1212846
Commit-Queue: Mike West <[email protected]>
Reviewed-by: Camille Lamy <[email protected]>
Cr-Commit-Position: refs/heads/master@{#589512}
|
bool NavigationRequest::IsAllowedByCSPDirective(
CSPContext* context,
CSPDirective::Name directive,
bool is_redirect,
bool url_upgraded_after_redirect,
bool is_response_check,
CSPContext::CheckCSPDisposition disposition) {
GURL url;
if (url_upgraded_after_redirect &&
disposition == CSPContext::CheckCSPDisposition::CHECK_REPORT_ONLY_CSP &&
common_params_.url.SchemeIs(url::kHttpsScheme)) {
GURL::Replacements replacements;
replacements.SetSchemeStr(url::kHttpScheme);
url = common_params_.url.ReplaceComponents(replacements);
} else {
url = common_params_.url;
}
return context->IsAllowedByCsp(
directive, url, is_redirect, is_response_check,
common_params_.source_location.value_or(SourceLocation()), disposition,
begin_params_->is_form_submission);
}
|
bool NavigationRequest::IsAllowedByCSPDirective(
CSPContext* context,
CSPDirective::Name directive,
bool is_redirect,
bool url_upgraded_after_redirect,
bool is_response_check,
CSPContext::CheckCSPDisposition disposition) {
GURL url;
if (url_upgraded_after_redirect &&
disposition == CSPContext::CheckCSPDisposition::CHECK_REPORT_ONLY_CSP &&
common_params_.url.SchemeIs(url::kHttpsScheme)) {
GURL::Replacements replacements;
replacements.SetSchemeStr(url::kHttpScheme);
url = common_params_.url.ReplaceComponents(replacements);
} else {
url = common_params_.url;
}
return context->IsAllowedByCsp(
directive, url, is_redirect, is_response_check,
common_params_.source_location.value_or(SourceLocation()), disposition,
begin_params_->is_form_submission);
}
|
C
|
Chrome
| 0 |
CVE-2016-9576
|
https://www.cvedetails.com/cve/CVE-2016-9576/
|
CWE-416
|
https://github.com/torvalds/linux/commit/a0ac402cfcdc904f9772e1762b3fda112dcc56a0
|
a0ac402cfcdc904f9772e1762b3fda112dcc56a0
|
Don't feed anything but regular iovec's to blk_rq_map_user_iov
In theory we could map other things, but there's a reason that function
is called "user_iov". Using anything else (like splice can do) just
confuses it.
Reported-and-tested-by: Johannes Thumshirn <[email protected]>
Cc: Al Viro <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
int blk_rq_map_user(struct request_queue *q, struct request *rq,
struct rq_map_data *map_data, void __user *ubuf,
unsigned long len, gfp_t gfp_mask)
{
struct iovec iov;
struct iov_iter i;
int ret = import_single_range(rq_data_dir(rq), ubuf, len, &iov, &i);
if (unlikely(ret < 0))
return ret;
return blk_rq_map_user_iov(q, rq, map_data, &i, gfp_mask);
}
|
int blk_rq_map_user(struct request_queue *q, struct request *rq,
struct rq_map_data *map_data, void __user *ubuf,
unsigned long len, gfp_t gfp_mask)
{
struct iovec iov;
struct iov_iter i;
int ret = import_single_range(rq_data_dir(rq), ubuf, len, &iov, &i);
if (unlikely(ret < 0))
return ret;
return blk_rq_map_user_iov(q, rq, map_data, &i, gfp_mask);
}
|
C
|
linux
| 0 |
CVE-2018-16075
|
https://www.cvedetails.com/cve/CVE-2018-16075/
|
CWE-254
|
https://github.com/chromium/chromium/commit/d913f72b4875cf0814fc3f03ad7c00642097c4a4
|
d913f72b4875cf0814fc3f03ad7c00642097c4a4
|
Remove RequireCSSExtensionForFile runtime enabled flag.
The feature has long since been stable (since M64) and doesn't seem
to be a need for this flag.
BUG=788936
Change-Id: I666390b869289c328acb4a2daa5bf4154e1702c0
Reviewed-on: https://chromium-review.googlesource.com/c/1324143
Reviewed-by: Mike West <[email protected]>
Reviewed-by: Camille Lamy <[email protected]>
Commit-Queue: Dave Tapuska <[email protected]>
Cr-Commit-Position: refs/heads/master@{#607329}
|
void WebRuntimeFeatures::EnableWebGL2ComputeContext(bool enable) {
RuntimeEnabledFeatures::SetWebGL2ComputeContextEnabled(enable);
}
|
void WebRuntimeFeatures::EnableWebGL2ComputeContext(bool enable) {
RuntimeEnabledFeatures::SetWebGL2ComputeContextEnabled(enable);
}
|
C
|
Chrome
| 0 |
CVE-2019-1559
|
https://www.cvedetails.com/cve/CVE-2019-1559/
|
CWE-200
|
https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=e9bbefbf0f24c57645e7ad6a5a71ae649d18ac8e
|
e9bbefbf0f24c57645e7ad6a5a71ae649d18ac8e
| null |
static int dtls1_process_buffered_records(SSL *s)
{
pitem *item;
SSL3_BUFFER *rb;
SSL3_RECORD *rr;
DTLS1_BITMAP *bitmap;
unsigned int is_next_epoch;
int replayok = 1;
item = pqueue_peek(s->d1->unprocessed_rcds.q);
if (item) {
/* Check if epoch is current. */
if (s->d1->unprocessed_rcds.epoch != s->d1->r_epoch)
return 1; /* Nothing to do. */
rr = &s->s3->rrec;
rb = &s->s3->rbuf;
if (rb->left > 0) {
/*
* We've still got data from the current packet to read. There could
* be a record from the new epoch in it - so don't overwrite it
* with the unprocessed records yet (we'll do it when we've
* finished reading the current packet).
*/
return 1;
}
/* Process all the records. */
while (pqueue_peek(s->d1->unprocessed_rcds.q)) {
dtls1_get_unprocessed_record(s);
bitmap = dtls1_get_bitmap(s, rr, &is_next_epoch);
if (bitmap == NULL) {
/*
* Should not happen. This will only ever be NULL when the
* current record is from a different epoch. But that cannot
* be the case because we already checked the epoch above
*/
SSLerr(SSL_F_DTLS1_PROCESS_BUFFERED_RECORDS,
ERR_R_INTERNAL_ERROR);
return 0;
}
#ifndef OPENSSL_NO_SCTP
/* Only do replay check if no SCTP bio */
if (!BIO_dgram_is_sctp(SSL_get_rbio(s)))
#endif
{
/*
* Check whether this is a repeat, or aged record. We did this
* check once already when we first received the record - but
* we might have updated the window since then due to
* records we subsequently processed.
*/
replayok = dtls1_record_replay_check(s, bitmap);
}
if (!replayok || !dtls1_process_record(s, bitmap)) {
/* dump this record */
rr->length = 0;
s->packet_length = 0;
continue;
}
if (dtls1_buffer_record(s, &(s->d1->processed_rcds),
s->s3->rrec.seq_num) < 0)
return 0;
}
}
/*
* sync epoch numbers once all the unprocessed records have been
* processed
*/
s->d1->processed_rcds.epoch = s->d1->r_epoch;
s->d1->unprocessed_rcds.epoch = s->d1->r_epoch + 1;
return 1;
}
|
static int dtls1_process_buffered_records(SSL *s)
{
pitem *item;
SSL3_BUFFER *rb;
SSL3_RECORD *rr;
DTLS1_BITMAP *bitmap;
unsigned int is_next_epoch;
int replayok = 1;
item = pqueue_peek(s->d1->unprocessed_rcds.q);
if (item) {
/* Check if epoch is current. */
if (s->d1->unprocessed_rcds.epoch != s->d1->r_epoch)
return 1; /* Nothing to do. */
rr = &s->s3->rrec;
rb = &s->s3->rbuf;
if (rb->left > 0) {
/*
* We've still got data from the current packet to read. There could
* be a record from the new epoch in it - so don't overwrite it
* with the unprocessed records yet (we'll do it when we've
* finished reading the current packet).
*/
return 1;
}
/* Process all the records. */
while (pqueue_peek(s->d1->unprocessed_rcds.q)) {
dtls1_get_unprocessed_record(s);
bitmap = dtls1_get_bitmap(s, rr, &is_next_epoch);
if (bitmap == NULL) {
/*
* Should not happen. This will only ever be NULL when the
* current record is from a different epoch. But that cannot
* be the case because we already checked the epoch above
*/
SSLerr(SSL_F_DTLS1_PROCESS_BUFFERED_RECORDS,
ERR_R_INTERNAL_ERROR);
return 0;
}
#ifndef OPENSSL_NO_SCTP
/* Only do replay check if no SCTP bio */
if (!BIO_dgram_is_sctp(SSL_get_rbio(s)))
#endif
{
/*
* Check whether this is a repeat, or aged record. We did this
* check once already when we first received the record - but
* we might have updated the window since then due to
* records we subsequently processed.
*/
replayok = dtls1_record_replay_check(s, bitmap);
}
if (!replayok || !dtls1_process_record(s, bitmap)) {
/* dump this record */
rr->length = 0;
s->packet_length = 0;
continue;
}
if (dtls1_buffer_record(s, &(s->d1->processed_rcds),
s->s3->rrec.seq_num) < 0)
return 0;
}
}
/*
* sync epoch numbers once all the unprocessed records have been
* processed
*/
s->d1->processed_rcds.epoch = s->d1->r_epoch;
s->d1->unprocessed_rcds.epoch = s->d1->r_epoch + 1;
return 1;
}
|
C
|
openssl
| 0 |
CVE-2013-2061
|
https://www.cvedetails.com/cve/CVE-2013-2061/
|
CWE-200
|
https://github.com/OpenVPN/openvpn/commit/11d21349a4e7e38a025849479b36ace7c2eec2ee
|
11d21349a4e7e38a025849479b36ace7c2eec2ee
|
Use constant time memcmp when comparing HMACs in openvpn_decrypt.
Signed-off-by: Steffan Karger <[email protected]>
Acked-by: Gert Doering <[email protected]>
Signed-off-by: Gert Doering <[email protected]>
|
fixup_key (struct key *key, const struct key_type *kt)
{
struct gc_arena gc = gc_new ();
if (kt->cipher)
{
#ifdef ENABLE_DEBUG
const struct key orig = *key;
#endif
const int ndc = key_des_num_cblocks (kt->cipher);
if (ndc)
key_des_fixup (key->cipher, kt->cipher_length, ndc);
#ifdef ENABLE_DEBUG
if (check_debug_level (D_CRYPTO_DEBUG))
{
if (memcmp (orig.cipher, key->cipher, kt->cipher_length))
dmsg (D_CRYPTO_DEBUG, "CRYPTO INFO: fixup_key: before=%s after=%s",
format_hex (orig.cipher, kt->cipher_length, 0, &gc),
format_hex (key->cipher, kt->cipher_length, 0, &gc));
}
#endif
}
gc_free (&gc);
}
|
fixup_key (struct key *key, const struct key_type *kt)
{
struct gc_arena gc = gc_new ();
if (kt->cipher)
{
#ifdef ENABLE_DEBUG
const struct key orig = *key;
#endif
const int ndc = key_des_num_cblocks (kt->cipher);
if (ndc)
key_des_fixup (key->cipher, kt->cipher_length, ndc);
#ifdef ENABLE_DEBUG
if (check_debug_level (D_CRYPTO_DEBUG))
{
if (memcmp (orig.cipher, key->cipher, kt->cipher_length))
dmsg (D_CRYPTO_DEBUG, "CRYPTO INFO: fixup_key: before=%s after=%s",
format_hex (orig.cipher, kt->cipher_length, 0, &gc),
format_hex (key->cipher, kt->cipher_length, 0, &gc));
}
#endif
}
gc_free (&gc);
}
|
C
|
openvpn
| 0 |
CVE-2013-2921
|
https://www.cvedetails.com/cve/CVE-2013-2921/
|
CWE-399
|
https://github.com/chromium/chromium/commit/1228817ab04a14df53b5a8446085f9c03bf6e964
|
1228817ab04a14df53b5a8446085f9c03bf6e964
|
repairs CopyFromCompositingSurface in HighDPI
This CL removes the DIP=>Pixel transform in
DelegatedFrameHost::CopyFromCompositingSurface(), because said
transformation seems to be happening later in the copy logic
and is currently being applied twice.
BUG=397708
Review URL: https://codereview.chromium.org/421293002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@286414 0039d316-1c4b-4281-b951-d872f2087c98
|
void DelegatedFrameHost::MaybeCreateResizeLock() {
if (!client_->ShouldCreateResizeLock())
return;
DCHECK(client_->GetCompositor());
ui::Compositor* compositor = client_->GetCompositor();
if (!compositor->HasObserver(this))
compositor->AddObserver(this);
bool defer_compositor_lock =
can_lock_compositor_ == NO_PENDING_RENDERER_FRAME ||
can_lock_compositor_ == NO_PENDING_COMMIT;
if (can_lock_compositor_ == YES_CAN_LOCK)
can_lock_compositor_ = YES_DID_LOCK;
resize_lock_ = client_->CreateResizeLock(defer_compositor_lock);
}
|
void DelegatedFrameHost::MaybeCreateResizeLock() {
if (!client_->ShouldCreateResizeLock())
return;
DCHECK(client_->GetCompositor());
ui::Compositor* compositor = client_->GetCompositor();
if (!compositor->HasObserver(this))
compositor->AddObserver(this);
bool defer_compositor_lock =
can_lock_compositor_ == NO_PENDING_RENDERER_FRAME ||
can_lock_compositor_ == NO_PENDING_COMMIT;
if (can_lock_compositor_ == YES_CAN_LOCK)
can_lock_compositor_ = YES_DID_LOCK;
resize_lock_ = client_->CreateResizeLock(defer_compositor_lock);
}
|
C
|
Chrome
| 0 |
CVE-2014-1715
|
https://www.cvedetails.com/cve/CVE-2014-1715/
|
CWE-22
|
https://github.com/chromium/chromium/commit/ce70785c73a2b7cf2b34de0d8439ca31929b4743
|
ce70785c73a2b7cf2b34de0d8439ca31929b4743
|
Consistently check if a block can handle pagination strut propagation.
https://codereview.chromium.org/1360753002 got it right for inline child
layout, but did nothing for block child layout.
BUG=329421
[email protected],[email protected]
Review URL: https://codereview.chromium.org/1387553002
Cr-Commit-Position: refs/heads/master@{#352429}
|
LayoutPoint LayoutBlockFlow::computeLogicalLocationForFloat(const FloatingObject& floatingObject, LayoutUnit logicalTopOffset) const
{
LayoutBox* childBox = floatingObject.layoutObject();
LayoutUnit logicalLeftOffset = logicalLeftOffsetForContent(); // Constant part of left offset.
LayoutUnit logicalRightOffset; // Constant part of right offset.
logicalRightOffset = logicalRightOffsetForContent();
LayoutUnit floatLogicalWidth = std::min(logicalWidthForFloat(floatingObject), logicalRightOffset - logicalLeftOffset); // The width we look for.
LayoutUnit floatLogicalLeft;
bool insideFlowThread = flowThreadContainingBlock();
if (childBox->style()->floating() == LeftFloat) {
LayoutUnit heightRemainingLeft = 1;
LayoutUnit heightRemainingRight = 1;
floatLogicalLeft = logicalLeftOffsetForPositioningFloat(logicalTopOffset, logicalLeftOffset, false, &heightRemainingLeft);
while (logicalRightOffsetForPositioningFloat(logicalTopOffset, logicalRightOffset, false, &heightRemainingRight) - floatLogicalLeft < floatLogicalWidth) {
logicalTopOffset += std::min(heightRemainingLeft, heightRemainingRight);
floatLogicalLeft = logicalLeftOffsetForPositioningFloat(logicalTopOffset, logicalLeftOffset, false, &heightRemainingLeft);
if (insideFlowThread) {
logicalRightOffset = logicalRightOffsetForContent(); // Constant part of right offset.
logicalLeftOffset = logicalLeftOffsetForContent(); // Constant part of left offset.
floatLogicalWidth = std::min(logicalWidthForFloat(floatingObject), logicalRightOffset - logicalLeftOffset);
}
}
floatLogicalLeft = std::max(logicalLeftOffset - borderAndPaddingLogicalLeft(), floatLogicalLeft);
} else {
LayoutUnit heightRemainingLeft = 1;
LayoutUnit heightRemainingRight = 1;
floatLogicalLeft = logicalRightOffsetForPositioningFloat(logicalTopOffset, logicalRightOffset, false, &heightRemainingRight);
while (floatLogicalLeft - logicalLeftOffsetForPositioningFloat(logicalTopOffset, logicalLeftOffset, false, &heightRemainingLeft) < floatLogicalWidth) {
logicalTopOffset += std::min(heightRemainingLeft, heightRemainingRight);
floatLogicalLeft = logicalRightOffsetForPositioningFloat(logicalTopOffset, logicalRightOffset, false, &heightRemainingRight);
if (insideFlowThread) {
logicalRightOffset = logicalRightOffsetForContent(); // Constant part of right offset.
logicalLeftOffset = logicalLeftOffsetForContent(); // Constant part of left offset.
floatLogicalWidth = std::min(logicalWidthForFloat(floatingObject), logicalRightOffset - logicalLeftOffset);
}
}
floatLogicalLeft -= logicalWidthForFloat(floatingObject);
}
return LayoutPoint(floatLogicalLeft, logicalTopOffset);
}
|
LayoutPoint LayoutBlockFlow::computeLogicalLocationForFloat(const FloatingObject& floatingObject, LayoutUnit logicalTopOffset) const
{
LayoutBox* childBox = floatingObject.layoutObject();
LayoutUnit logicalLeftOffset = logicalLeftOffsetForContent(); // Constant part of left offset.
LayoutUnit logicalRightOffset; // Constant part of right offset.
logicalRightOffset = logicalRightOffsetForContent();
LayoutUnit floatLogicalWidth = std::min(logicalWidthForFloat(floatingObject), logicalRightOffset - logicalLeftOffset); // The width we look for.
LayoutUnit floatLogicalLeft;
bool insideFlowThread = flowThreadContainingBlock();
if (childBox->style()->floating() == LeftFloat) {
LayoutUnit heightRemainingLeft = 1;
LayoutUnit heightRemainingRight = 1;
floatLogicalLeft = logicalLeftOffsetForPositioningFloat(logicalTopOffset, logicalLeftOffset, false, &heightRemainingLeft);
while (logicalRightOffsetForPositioningFloat(logicalTopOffset, logicalRightOffset, false, &heightRemainingRight) - floatLogicalLeft < floatLogicalWidth) {
logicalTopOffset += std::min(heightRemainingLeft, heightRemainingRight);
floatLogicalLeft = logicalLeftOffsetForPositioningFloat(logicalTopOffset, logicalLeftOffset, false, &heightRemainingLeft);
if (insideFlowThread) {
logicalRightOffset = logicalRightOffsetForContent(); // Constant part of right offset.
logicalLeftOffset = logicalLeftOffsetForContent(); // Constant part of left offset.
floatLogicalWidth = std::min(logicalWidthForFloat(floatingObject), logicalRightOffset - logicalLeftOffset);
}
}
floatLogicalLeft = std::max(logicalLeftOffset - borderAndPaddingLogicalLeft(), floatLogicalLeft);
} else {
LayoutUnit heightRemainingLeft = 1;
LayoutUnit heightRemainingRight = 1;
floatLogicalLeft = logicalRightOffsetForPositioningFloat(logicalTopOffset, logicalRightOffset, false, &heightRemainingRight);
while (floatLogicalLeft - logicalLeftOffsetForPositioningFloat(logicalTopOffset, logicalLeftOffset, false, &heightRemainingLeft) < floatLogicalWidth) {
logicalTopOffset += std::min(heightRemainingLeft, heightRemainingRight);
floatLogicalLeft = logicalRightOffsetForPositioningFloat(logicalTopOffset, logicalRightOffset, false, &heightRemainingRight);
if (insideFlowThread) {
logicalRightOffset = logicalRightOffsetForContent(); // Constant part of right offset.
logicalLeftOffset = logicalLeftOffsetForContent(); // Constant part of left offset.
floatLogicalWidth = std::min(logicalWidthForFloat(floatingObject), logicalRightOffset - logicalLeftOffset);
}
}
floatLogicalLeft -= logicalWidthForFloat(floatingObject);
}
return LayoutPoint(floatLogicalLeft, logicalTopOffset);
}
|
C
|
Chrome
| 0 |
CVE-2011-3961
|
https://www.cvedetails.com/cve/CVE-2011-3961/
|
CWE-362
|
https://github.com/chromium/chromium/commit/b712795852f9d6073e062680e280634290c4ba5d
|
b712795852f9d6073e062680e280634290c4ba5d
|
Fix uninitialized variables in HarfBuzzShaperBase
https://bugs.webkit.org/show_bug.cgi?id=79546
Reviewed by Dirk Pranke.
These were introduced in r108733.
* platform/graphics/harfbuzz/HarfBuzzShaperBase.cpp:
(WebCore::HarfBuzzShaperBase::HarfBuzzShaperBase):
git-svn-id: svn://svn.chromium.org/blink/trunk@108871 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
void HarfBuzzShaperBase::setPadding(int padding)
{
m_padding = padding;
m_padError = 0;
if (!m_padding)
return;
unsigned numWordEnds = 0;
for (unsigned i = 0; i < m_normalizedBufferLength; i++) {
if (isWordEnd(i))
numWordEnds++;
}
if (numWordEnds)
m_padPerWordBreak = m_padding / numWordEnds;
else
m_padPerWordBreak = 0;
}
|
void HarfBuzzShaperBase::setPadding(int padding)
{
m_padding = padding;
m_padError = 0;
if (!m_padding)
return;
unsigned numWordEnds = 0;
for (unsigned i = 0; i < m_normalizedBufferLength; i++) {
if (isWordEnd(i))
numWordEnds++;
}
if (numWordEnds)
m_padPerWordBreak = m_padding / numWordEnds;
else
m_padPerWordBreak = 0;
}
|
C
|
Chrome
| 0 |
CVE-2017-5061
|
https://www.cvedetails.com/cve/CVE-2017-5061/
|
CWE-362
|
https://github.com/chromium/chromium/commit/5d78b84d39bd34bc9fce9d01c0dcd5a22a330d34
|
5d78b84d39bd34bc9fce9d01c0dcd5a22a330d34
|
(Reland) Discard compositor frames from unloaded web content
This is a reland of https://codereview.chromium.org/2707243005/ with a
small change to fix an uninitialized memory error that fails on MSAN
bots.
BUG=672847
[email protected], [email protected]
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_site_isolation
Review-Url: https://codereview.chromium.org/2731283003
Cr-Commit-Position: refs/heads/master@{#454954}
|
void SetCallback(LayerTreeHostImpl* host_impl, bool enable) {
host_impl->SetTreeActivationCallback(
enable
? base::Bind(&LayerTreeHostTestKeepSwapPromise::ActivationCallback,
base::Unretained(this))
: base::Closure());
}
|
void SetCallback(LayerTreeHostImpl* host_impl, bool enable) {
host_impl->SetTreeActivationCallback(
enable
? base::Bind(&LayerTreeHostTestKeepSwapPromise::ActivationCallback,
base::Unretained(this))
: base::Closure());
}
|
C
|
Chrome
| 0 |
CVE-2017-5044
|
https://www.cvedetails.com/cve/CVE-2017-5044/
|
CWE-119
|
https://github.com/chromium/chromium/commit/62154472bd2c43e1790dd1bd8a527c1db9118d88
|
62154472bd2c43e1790dd1bd8a527c1db9118d88
|
bluetooth: Implement getAvailability()
This change implements the getAvailability() method for
navigator.bluetooth as defined in the specification.
Bug: 707640
Change-Id: I9e9b3e7f8ea7f259e975f71cb6d9570e5f04b479
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1651516
Reviewed-by: Chris Harrelson <[email protected]>
Reviewed-by: Giovanni Ortuño Urquidi <[email protected]>
Reviewed-by: Kinuko Yasuda <[email protected]>
Commit-Queue: Ovidio de Jesús Ruiz-Henríquez <[email protected]>
Auto-Submit: Ovidio de Jesús Ruiz-Henríquez <[email protected]>
Cr-Commit-Position: refs/heads/master@{#688987}
|
FakeCentral::FakeCentral(mojom::CentralState state,
mojom::FakeCentralRequest request)
: state_(state), binding_(this, std::move(request)) {}
|
FakeCentral::FakeCentral(mojom::CentralState state,
mojom::FakeCentralRequest request)
: state_(state), binding_(this, std::move(request)) {}
|
C
|
Chrome
| 0 |
CVE-2016-9588
|
https://www.cvedetails.com/cve/CVE-2016-9588/
|
CWE-388
|
https://github.com/torvalds/linux/commit/ef85b67385436ddc1998f45f1d6a210f935b3388
|
ef85b67385436ddc1998f45f1d6a210f935b3388
|
kvm: nVMX: Allow L1 to intercept software exceptions (#BP and #OF)
When L2 exits to L0 due to "exception or NMI", software exceptions
(#BP and #OF) for which L1 has requested an intercept should be
handled by L1 rather than L0. Previously, only hardware exceptions
were forwarded to L1.
Signed-off-by: Jim Mattson <[email protected]>
Cc: [email protected]
Signed-off-by: Paolo Bonzini <[email protected]>
|
static int nested_vmx_check_msr_switch(struct kvm_vcpu *vcpu,
unsigned long count_field,
unsigned long addr_field)
{
int maxphyaddr;
u64 count, addr;
if (vmcs12_read_any(vcpu, count_field, &count) ||
vmcs12_read_any(vcpu, addr_field, &addr)) {
WARN_ON(1);
return -EINVAL;
}
if (count == 0)
return 0;
maxphyaddr = cpuid_maxphyaddr(vcpu);
if (!IS_ALIGNED(addr, 16) || addr >> maxphyaddr ||
(addr + count * sizeof(struct vmx_msr_entry) - 1) >> maxphyaddr) {
pr_debug_ratelimited(
"nVMX: invalid MSR switch (0x%lx, %d, %llu, 0x%08llx)",
addr_field, maxphyaddr, count, addr);
return -EINVAL;
}
return 0;
}
|
static int nested_vmx_check_msr_switch(struct kvm_vcpu *vcpu,
unsigned long count_field,
unsigned long addr_field)
{
int maxphyaddr;
u64 count, addr;
if (vmcs12_read_any(vcpu, count_field, &count) ||
vmcs12_read_any(vcpu, addr_field, &addr)) {
WARN_ON(1);
return -EINVAL;
}
if (count == 0)
return 0;
maxphyaddr = cpuid_maxphyaddr(vcpu);
if (!IS_ALIGNED(addr, 16) || addr >> maxphyaddr ||
(addr + count * sizeof(struct vmx_msr_entry) - 1) >> maxphyaddr) {
pr_debug_ratelimited(
"nVMX: invalid MSR switch (0x%lx, %d, %llu, 0x%08llx)",
addr_field, maxphyaddr, count, addr);
return -EINVAL;
}
return 0;
}
|
C
|
linux
| 0 |
CVE-2011-3084
|
https://www.cvedetails.com/cve/CVE-2011-3084/
|
CWE-264
|
https://github.com/chromium/chromium/commit/744c2a2d90c3c9a33c818e1ea4b7ccb5010663a0
|
744c2a2d90c3c9a33c818e1ea4b7ccb5010663a0
|
Allow browser to handle all WebUI navigations.
BUG=113496
TEST="Google Dashboard" link in Sync settings loads in new process.
Review URL: http://codereview.chromium.org/9663045
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126949 0039d316-1c4b-4281-b951-d872f2087c98
|
void RenderViewImpl::PpapiPluginCancelComposition() {
Send(new ViewHostMsg_ImeCancelComposition(routing_id()));
ui::Range range(ui::Range::InvalidRange());
Send(new ViewHostMsg_ImeCompositionRangeChanged(routing_id(), range));
}
|
void RenderViewImpl::PpapiPluginCancelComposition() {
Send(new ViewHostMsg_ImeCancelComposition(routing_id()));
ui::Range range(ui::Range::InvalidRange());
Send(new ViewHostMsg_ImeCompositionRangeChanged(routing_id(), range));
}
|
C
|
Chrome
| 0 |
CVE-2018-6096
|
https://www.cvedetails.com/cve/CVE-2018-6096/
| null |
https://github.com/chromium/chromium/commit/36f801fdbec07d116a6f4f07bb363f10897d6a51
|
36f801fdbec07d116a6f4f07bb363f10897d6a51
|
If a page calls |window.focus()|, kick it out of fullscreen.
BUG=776418, 800056
Change-Id: I1880fe600e4814c073f247c43b1c1ac80c8fc017
Reviewed-on: https://chromium-review.googlesource.com/852378
Reviewed-by: Nasko Oskov <[email protected]>
Reviewed-by: Philip Jägenstedt <[email protected]>
Commit-Queue: Avi Drissman <[email protected]>
Cr-Commit-Position: refs/heads/master@{#533790}
|
void RenderFrameImpl::HandleJavascriptExecutionResult(
const base::string16& jscript,
int id,
bool notify_result,
v8::Local<v8::Value> result) {
if (notify_result) {
base::ListValue list;
if (!result.IsEmpty()) {
v8::Local<v8::Context> context = frame_->MainWorldScriptContext();
v8::Context::Scope context_scope(context);
V8ValueConverterImpl converter;
converter.SetDateAllowed(true);
converter.SetRegExpAllowed(true);
std::unique_ptr<base::Value> result_value(
converter.FromV8Value(result, context));
list.Set(0, result_value ? std::move(result_value)
: std::make_unique<base::Value>());
} else {
list.Set(0, std::make_unique<base::Value>());
}
Send(new FrameHostMsg_JavaScriptExecuteResponse(routing_id_, id, list));
}
}
|
void RenderFrameImpl::HandleJavascriptExecutionResult(
const base::string16& jscript,
int id,
bool notify_result,
v8::Local<v8::Value> result) {
if (notify_result) {
base::ListValue list;
if (!result.IsEmpty()) {
v8::Local<v8::Context> context = frame_->MainWorldScriptContext();
v8::Context::Scope context_scope(context);
V8ValueConverterImpl converter;
converter.SetDateAllowed(true);
converter.SetRegExpAllowed(true);
std::unique_ptr<base::Value> result_value(
converter.FromV8Value(result, context));
list.Set(0, result_value ? std::move(result_value)
: std::make_unique<base::Value>());
} else {
list.Set(0, std::make_unique<base::Value>());
}
Send(new FrameHostMsg_JavaScriptExecuteResponse(routing_id_, id, list));
}
}
|
C
|
Chrome
| 0 |
CVE-2016-1237
|
https://www.cvedetails.com/cve/CVE-2016-1237/
|
CWE-284
|
https://github.com/torvalds/linux/commit/999653786df6954a31044528ac3f7a5dadca08f4
|
999653786df6954a31044528ac3f7a5dadca08f4
|
nfsd: check permissions when setting ACLs
Use set_posix_acl, which includes proper permission checks, instead of
calling ->set_acl directly. Without this anyone may be able to grant
themselves permissions to a file by setting the ACL.
Lock the inode to make the new checks atomic with respect to set_acl.
(Also, nfsd was the only caller of set_acl not locking the inode, so I
suspect this may fix other races.)
This also simplifies the code, and ensures our ACLs are checked by
posix_acl_valid.
The permission checks and the inode locking were lost with commit
4ac7249e, which changed nfsd to use the set_acl inode operation directly
instead of going through xattr handlers.
Reported-by: David Sinquin <[email protected]>
[[email protected]: use set_posix_acl]
Fixes: 4ac7249e
Cc: Christoph Hellwig <[email protected]>
Cc: Al Viro <[email protected]>
Cc: [email protected]
Signed-off-by: J. Bruce Fields <[email protected]>
|
static int find_gid(struct posix_acl_state *state, kgid_t gid)
{
struct posix_ace_state_array *a = state->groups;
int i;
for (i = 0; i < a->n; i++)
if (gid_eq(a->aces[i].gid, gid))
return i;
/* Not found: */
a->n++;
a->aces[i].gid = gid;
a->aces[i].perms.allow = state->everyone.allow;
a->aces[i].perms.deny = state->everyone.deny;
return i;
}
|
static int find_gid(struct posix_acl_state *state, kgid_t gid)
{
struct posix_ace_state_array *a = state->groups;
int i;
for (i = 0; i < a->n; i++)
if (gid_eq(a->aces[i].gid, gid))
return i;
/* Not found: */
a->n++;
a->aces[i].gid = gid;
a->aces[i].perms.allow = state->everyone.allow;
a->aces[i].perms.deny = state->everyone.deny;
return i;
}
|
C
|
linux
| 0 |
CVE-2011-3053
|
https://www.cvedetails.com/cve/CVE-2011-3053/
|
CWE-399
|
https://github.com/chromium/chromium/commit/c442b3eda2f1fdd4d1d4864c34c43cbaf223acae
|
c442b3eda2f1fdd4d1d4864c34c43cbaf223acae
|
chromeos: Move audio, power, and UI files into subdirs.
This moves more files from chrome/browser/chromeos/ into
subdirectories.
BUG=chromium-os:22896
TEST=did chrome os builds both with and without aura
TBR=sky
Review URL: http://codereview.chromium.org/9125006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116746 0039d316-1c4b-4281-b951-d872f2087c98
|
void SettingLevelBubble::UpdateWithoutShowingBubble(double percent,
bool enabled) {
UpdateTargetPercent(percent);
if (view_)
view_->SetEnabled(enabled);
}
|
void SettingLevelBubble::UpdateWithoutShowingBubble(double percent,
bool enabled) {
UpdateTargetPercent(percent);
if (view_)
view_->SetEnabled(enabled);
}
|
C
|
Chrome
| 0 |
CVE-2011-1799
|
https://www.cvedetails.com/cve/CVE-2011-1799/
|
CWE-20
|
https://github.com/chromium/chromium/commit/5fd35e5359c6345b8709695cd71fba307318e6aa
|
5fd35e5359c6345b8709695cd71fba307318e6aa
|
Source/WebCore: Fix for bug 64046 - Wrong image height in absolutely positioned div in
relatively positioned parent with bottom padding.
https://bugs.webkit.org/show_bug.cgi?id=64046
Patch by Kulanthaivel Palanichamy <[email protected]> on 2011-07-21
Reviewed by David Hyatt.
Test: fast/css/absolute-child-with-percent-height-inside-relative-parent.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::availableLogicalHeightUsing):
LayoutTests: Test to cover absolutely positioned child with percentage height
in relatively positioned parent with bottom padding.
https://bugs.webkit.org/show_bug.cgi?id=64046
Patch by Kulanthaivel Palanichamy <[email protected]> on 2011-07-21
Reviewed by David Hyatt.
* fast/css/absolute-child-with-percent-height-inside-relative-parent-expected.txt: Added.
* fast/css/absolute-child-with-percent-height-inside-relative-parent.html: Added.
git-svn-id: svn://svn.chromium.org/blink/trunk@91533 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|
LayoutUnit RenderBox::computeBorderBoxLogicalHeight(LayoutUnit height) const
{
LayoutUnit bordersPlusPadding = borderAndPaddingLogicalHeight();
if (style()->boxSizing() == CONTENT_BOX)
return height + bordersPlusPadding;
return max(height, bordersPlusPadding);
}
|
LayoutUnit RenderBox::computeBorderBoxLogicalHeight(LayoutUnit height) const
{
LayoutUnit bordersPlusPadding = borderAndPaddingLogicalHeight();
if (style()->boxSizing() == CONTENT_BOX)
return height + bordersPlusPadding;
return max(height, bordersPlusPadding);
}
|
C
|
Chrome
| 0 |
CVE-2018-16088
|
https://www.cvedetails.com/cve/CVE-2018-16088/
| null |
https://github.com/chromium/chromium/commit/4379a7fcff8190aa7ba72307b398161c32102c52
|
4379a7fcff8190aa7ba72307b398161c32102c52
|
Only allow downloading in response to real keyboard modifiers
BUG=848531
Change-Id: I97554c8d312243b55647f1376945aee32dbd95bf
Reviewed-on: https://chromium-review.googlesource.com/1082216
Reviewed-by: Mike West <[email protected]>
Commit-Queue: Jochen Eisinger <[email protected]>
Cr-Commit-Position: refs/heads/master@{#564051}
|
FrameLoader::FrameLoader(LocalFrame* frame)
: frame_(frame),
progress_tracker_(ProgressTracker::Create(frame)),
in_stop_all_loaders_(false),
in_restore_scroll_(false),
forced_sandbox_flags_(kSandboxNone),
dispatching_did_clear_window_object_in_main_world_(false),
protect_provisional_loader_(false),
detached_(false) {
DCHECK(frame_);
TRACE_EVENT_OBJECT_CREATED_WITH_ID("loading", "FrameLoader", this);
TakeObjectSnapshot();
}
|
FrameLoader::FrameLoader(LocalFrame* frame)
: frame_(frame),
progress_tracker_(ProgressTracker::Create(frame)),
in_stop_all_loaders_(false),
in_restore_scroll_(false),
forced_sandbox_flags_(kSandboxNone),
dispatching_did_clear_window_object_in_main_world_(false),
protect_provisional_loader_(false),
detached_(false) {
DCHECK(frame_);
TRACE_EVENT_OBJECT_CREATED_WITH_ID("loading", "FrameLoader", this);
TakeObjectSnapshot();
}
|
C
|
Chrome
| 0 |
CVE-2015-5330
|
https://www.cvedetails.com/cve/CVE-2015-5330/
|
CWE-200
|
https://git.samba.org/?p=samba.git;a=commit;h=ba5dbda6d0174a59d221c45cca52ecd232820d48
|
ba5dbda6d0174a59d221c45cca52ecd232820d48
| null |
_PUBLIC_ size_t strlen_m_ext_term_null(const char *s,
const charset_t src_charset,
const charset_t dst_charset)
{
size_t len;
if (!s) {
return 0;
}
len = strlen_m_ext(s, src_charset, dst_charset);
if (len == 0) {
return 0;
}
return len+1;
}
|
_PUBLIC_ size_t strlen_m_ext_term_null(const char *s,
const charset_t src_charset,
const charset_t dst_charset)
{
size_t len;
if (!s) {
return 0;
}
len = strlen_m_ext(s, src_charset, dst_charset);
if (len == 0) {
return 0;
}
return len+1;
}
|
C
|
samba
| 0 |
Subsets and Splits
CWE-119 Function Changes
This query retrieves specific examples (before and after code changes) of vulnerabilities with CWE-119, providing basic filtering but limited insight.
Vulnerable Code with CWE IDs
The query filters and combines records from multiple datasets to list specific vulnerability details, providing a basic overview of vulnerable functions but lacking deeper insights.
Vulnerable Functions in BigVul
Retrieves details of vulnerable functions from both validation and test datasets where vulnerabilities are present, providing a basic set of data points for further analysis.
Vulnerable Code Functions
This query filters and shows raw data for vulnerable functions, which provides basic insight into specific vulnerabilities but lacks broader analytical value.
Top 100 Vulnerable Functions
Retrieves 100 samples of vulnerabilities from the training dataset, showing the CVE ID, CWE ID, and code changes before and after the vulnerability, which is a basic filtering of vulnerability data.