func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
void usb_disable_device(struct usb_device *dev, int skip_ep0)
{
int i;
struct usb_hcd *hcd = bus_to_hcd(dev->bus);
/* getting rid of interfaces will disconnect
* any drivers bound to them (a key side effect)
*/
if (dev->actconfig) {
/*
* FIXME: In order to avoid self-deadlock involving the
* bandwidth_... | 0 | [
"CWE-416"
] | linux | 056ad39ee9253873522f6469c3364964a322912b | 105,854,207,522,840,800,000,000,000,000,000,000,000 | 66 | USB: core: Fix free-while-in-use bug in the USB S-Glibrary
FuzzUSB (a variant of syzkaller) found a free-while-still-in-use bug
in the USB scatter-gather library:
BUG: KASAN: use-after-free in atomic_read
include/asm-generic/atomic-instrumented.h:26 [inline]
BUG: KASAN: use-after-free in usb_hcd_unlink_urb+0x5f/0x170... |
static unsigned long mmap_rnd(void)
{
unsigned long rnd = 0UL;
if (current->flags & PF_RANDOMIZE) {
unsigned long val = get_random_int();
if (test_thread_flag(TIF_32BIT))
rnd = (val % (1UL << (22UL-PAGE_SHIFT)));
else
rnd = (val % (1UL << (29UL-PAGE_SHIFT)));
}
return (rnd << PAGE_SHIFT) * 2;
} | 1 | [] | linux | fa8cbaaf5a68f62db3f9a8444ecbb940b47984cb | 310,751,343,236,350,400,000,000,000,000,000,000,000 | 13 | powerpc+sparc64/mm: Remove hack in mmap randomize layout
Since commit 8a0a9bd4db63bc45e301, this comment in mmap_rnd() does not
hold true as the value returned by get_random_int() will in fact be
different every single call. Remove the comment and simplify the code
back to its original desired form.
This reverts com... |
SWFShape_addSolidFillStyle(SWFShape shape, byte r, byte g, byte b, byte a)
{
int ret;
SWFFillStyle fill = newSWFSolidFillStyle(r, g, b, a);
ret = addFillStyle(shape, fill);
if(ret < 0) /* error */
{
destroySWFFillStyle(fill);
return NULL;
}
else if(ret == shape->nFills) /* new fill */
{
return fill;
... | 0 | [
"CWE-20",
"CWE-476"
] | libming | 6e76e8c71cb51c8ba0aa9737a636b9ac3029887f | 103,219,793,130,938,230,000,000,000,000,000,000,000 | 22 | SWFShape_setLeftFillStyle: prevent fill overflow |
CImg<T>& _system_strescape() {
#define cimg_system_strescape(c,s) case c : if (p!=ptrs) CImg<T>(ptrs,(unsigned int)(p-ptrs),1,1,1,false).\
move_to(list); \
CImg<T>(s,(unsigned int)std::strlen(s),1,1,1,false).move_to(list); ptrs = p + 1; break
CImgList<T> list;
const T *ptrs = _data;
ci... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 297,293,231,011,277,800,000,000,000,000,000,000,000 | 16 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
static inline int __pmd_alloc(struct mm_struct *mm, pud_t *pud,
unsigned long address)
{
return 0;
} | 0 | [
"CWE-119"
] | linux | 1be7107fbe18eed3e319a6c3e83c78254b693acb | 85,128,305,304,594,940,000,000,000,000,000,000,000 | 5 | mm: larger stack guard gap, between vmas
Stack guard page is a useful feature to reduce a risk of stack smashing
into a different mapping. We have been using a single page gap which
is sufficient to prevent having stack adjacent to a different mapping.
But this seems to be insufficient in the light of the stack usage ... |
static inline unsigned long realpath_cache_key(const char *path, int path_len) /* {{{ */
{
register unsigned long h;
const char *e = path + path_len;
for (h = 2166136261U; path < e;) {
h *= 16777619;
h ^= *path++;
}
return h;
} | 0 | [
"CWE-190"
] | php-src | 0218acb7e756a469099c4ccfb22bce6c2bd1ef87 | 55,961,950,923,553,490,000,000,000,000,000,000,000 | 12 | Fix for bug #72513 |
static void fd_revalidate(FDrive *drv)
{
int rc;
FLOPPY_DPRINTF("revalidate\n");
if (drv->blk != NULL) {
drv->ro = !blk_is_writable(drv->blk);
if (!blk_is_inserted(drv->blk)) {
FLOPPY_DPRINTF("No disk in drive\n");
drv->disk = FLOPPY_DRIVE_TYPE_NONE;
fd_e... | 0 | [
"CWE-787"
] | qemu | defac5e2fbddf8423a354ff0454283a2115e1367 | 198,246,498,057,962,900,000,000,000,000,000,000,000 | 32 | hw/block/fdc: Prevent end-of-track overrun (CVE-2021-3507)
Per the 82078 datasheet, if the end-of-track (EOT byte in
the FIFO) is more than the number of sectors per side, the
command is terminated unsuccessfully:
* 5.2.5 DATA TRANSFER TERMINATION
The 82078 supports terminal count explicitly through
the TC pin a... |
explicit ConvertExpm1Stage(const GraphOptimizerContext& ctx,
const ArithmeticOptimizerContext& ctx_ext)
: ArithmeticOptimizerStage("ConvertExpm1", ctx, ctx_ext) {} | 0 | [
"CWE-476"
] | tensorflow | e6340f0665d53716ef3197ada88936c2a5f7a2d3 | 190,902,261,313,716,860,000,000,000,000,000,000,000 | 3 | Handle a special grappler case resulting in crash.
It might happen that a malformed input could be used to trick Grappler into trying to optimize a node with no inputs. This, in turn, would produce a null pointer dereference and a segfault.
PiperOrigin-RevId: 369242852
Change-Id: I2e5cbe7aec243d34a6d60220ac8ac9b16f13... |
restore_signal (sig)
int sig;
{
set_signal_handler (sig, original_signals[sig]);
change_signal (sig, (char *)DEFAULT_SIG);
sigmodes[sig] &= ~SIG_TRAPPED;
} | 0 | [] | bash | 955543877583837c85470f7fb8a97b7aa8d45e6c | 313,624,363,635,387,440,000,000,000,000,000,000,000 | 7 | bash-4.4-rc2 release |
did_set_option(
int opt_idx,
int opt_flags, // possibly with OPT_MODELINE
int new_value, // value was replaced completely
int value_checked) // value was checked to be safe, no need to set the
// P_INSECURE flag.
{
long_u *p;
options[opt_idx].flags |= P_WAS_SET;
... | 0 | [
"CWE-122"
] | vim | b7081e135a16091c93f6f5f7525a5c58fb7ca9f9 | 113,970,750,335,882,140,000,000,000,000,000,000,000 | 24 | patch 8.2.3402: invalid memory access when using :retab with large value
Problem: Invalid memory access when using :retab with large value.
Solution: Check the number is positive. |
void f2fs_msg(struct super_block *sb, const char *level, const char *fmt, ...)
{
struct va_format vaf;
va_list args;
va_start(args, fmt);
vaf.fmt = fmt;
vaf.va = &args;
printk_ratelimited("%sF2FS-fs (%s): %pV\n", level, sb->s_id, &vaf);
va_end(args);
} | 0 | [
"CWE-20"
] | linux | 638164a2718f337ea224b747cf5977ef143166a4 | 195,556,236,220,560,730,000,000,000,000,000,000,000 | 11 | f2fs: fix potential panic during fstrim
As Ju Hyung Park reported:
"When 'fstrim' is called for manual trim, a BUG() can be triggered
randomly with this patch.
I'm seeing this issue on both x86 Desktop and arm64 Android phone.
On x86 Desktop, this was caused during Ubuntu boot-up. I have a
cronjob installed which c... |
int setup_allrouters_membership(struct Interface *iface)
{
struct ipv6_mreq mreq;
memset(&mreq, 0, sizeof(mreq));
mreq.ipv6mr_interface = iface->if_index;
/* ipv6-allrouters: ff02::2 */
mreq.ipv6mr_multiaddr.s6_addr32[0] = htonl(0xFF020000);
mreq.ipv6mr_multiaddr.s6_addr32[3] = htonl(0x2);
if (setsockopt(sock... | 0 | [
"CWE-22"
] | radvd | 92e22ca23e52066da2258df8c76a2dca8a428bcc | 84,829,159,108,663,140,000,000,000,000,000,000,000 | 23 | set_interface_var() doesn't check interface name and blindly does
fopen(path "/" ifname, "w") on it. As "ifname" is an untrusted input, it
should be checked for ".." and/or "/" in it. Otherwise, an infected
unprivileged daemon may overwrite contents of file named "mtu",
"hoplimit", etc. in arbitrary location with arb... |
static void fill_block8_c(uint8_t *block, uint8_t value, int line_size, int h)
{
int i;
for (i = 0; i < h; i++) {
memset(block, value, 8);
block += line_size;
}
} | 0 | [
"CWE-703",
"CWE-189"
] | FFmpeg | 454a11a1c9c686c78aa97954306fb63453299760 | 112,159,137,407,238,890,000,000,000,000,000,000,000 | 9 | avcodec/dsputil: fix signedness in sizeof() comparissions
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
struct phy_device *mdiobus_get_phy(struct mii_bus *bus, int addr)
{
struct mdio_device *mdiodev = bus->mdio_map[addr];
if (!mdiodev)
return NULL;
if (!(mdiodev->flags & MDIO_DEVICE_FLAG_PHY))
return NULL;
return container_of(mdiodev, struct phy_device, mdio);
} | 0 | [
"CWE-416"
] | linux | 6ff7b060535e87c2ae14dd8548512abfdda528fb | 137,334,229,673,091,840,000,000,000,000,000,000,000 | 12 | mdio_bus: Fix use-after-free on device_register fails
KASAN has found use-after-free in fixed_mdio_bus_init,
commit 0c692d07842a ("drivers/net/phy/mdio_bus.c: call
put_device on device_register() failure") call put_device()
while device_register() fails,give up the last reference
to the device and allow mdiobus_releas... |
g_socket_client_connect_to_uri_finish (GSocketClient *client,
GAsyncResult *result,
GError **error)
{
return g_socket_client_connect_finish (client, result, error);
} | 0 | [
"CWE-754"
] | glib | d553d92d6e9f53cbe5a34166fcb919ba652c6a8e | 299,728,210,836,773,330,000,000,000,000,000,000,000 | 6 | gsocketclient: Fix criticals
This ensures the parent GTask is kept alive as long as an enumeration
is running and trying to connect.
Closes #1646
Closes #1649 |
void kvm_kvfree(const void *addr)
{
if (is_vmalloc_addr(addr))
vfree(addr);
else
kfree(addr);
} | 0 | [
"CWE-399"
] | linux | 12d6e7538e2d418c08f082b1b44ffa5fb7270ed8 | 149,403,756,920,771,100,000,000,000,000,000,000,000 | 7 | KVM: perform an invalid memslot step for gpa base change
PPC must flush all translations before the new memory slot
is visible.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com> |
static bool __ieee80211_tx(struct ieee80211_local *local,
struct sk_buff_head *skbs, int led_len,
struct sta_info *sta, bool txpending)
{
struct ieee80211_tx_info *info;
struct ieee80211_sub_if_data *sdata;
struct ieee80211_vif *vif;
struct ieee80211_sta *pubsta;
struct sk_buff *skb;
bool result = tru... | 0 | [
"CWE-362"
] | linux | 1d147bfa64293b2723c4fec50922168658e613ba | 310,465,913,768,343,570,000,000,000,000,000,000,000 | 62 | mac80211: fix AP powersave TX vs. wakeup race
There is a race between the TX path and the STA wakeup: while
a station is sleeping, mac80211 buffers frames until it wakes
up, then the frames are transmitted. However, the RX and TX
path are concurrent, so the packet indicating wakeup can be
processed while a packet is b... |
static void gfar_reset_task(struct work_struct *work)
{
struct gfar_private *priv = container_of(work, struct gfar_private,
reset_task);
reset_gfar(priv->ndev);
} | 0 | [] | linux | d8861bab48b6c1fc3cdbcab8ff9d1eaea43afe7f | 67,307,651,302,730,780,000,000,000,000,000,000,000 | 6 | gianfar: fix jumbo packets+napi+rx overrun crash
When using jumbo packets and overrunning rx queue with napi enabled,
the following sequence is observed in gfar_add_rx_frag:
| lstatus | | skb |
t | lstatus, size, flags | first | len, data_len, *... |
static int xfrm_add_sa(struct sk_buff *skb, struct nlmsghdr *nlh,
struct nlattr **attrs)
{
struct net *net = sock_net(skb->sk);
struct xfrm_usersa_info *p = nlmsg_data(nlh);
struct xfrm_state *x;
int err;
struct km_event c;
err = verify_newsa_info(p, attrs);
if (err)
return err;
x = xfrm_state_construct(n... | 0 | [
"CWE-416",
"CWE-284"
] | linux | 1137b5e2529a8f5ca8ee709288ecba3e68044df2 | 165,858,835,156,130,010,000,000,000,000,000,000,000 | 41 | ipsec: Fix aborted xfrm policy dump crash
An independent security researcher, Mohamed Ghannam, has reported
this vulnerability to Beyond Security's SecuriTeam Secure Disclosure
program.
The xfrm_dump_policy_done function expects xfrm_dump_policy to
have been called at least once or it will crash. This can be
trigger... |
bool SQInstance::InstanceOf(SQClass *trg)
{
SQClass *parent = _class;
while(parent != NULL) {
if(parent == trg)
return true;
parent = parent->_base;
}
return false;
} | 0 | [
"CWE-125"
] | squirrel | 23a0620658714b996d20da3d4dd1a0dcf9b0bd98 | 106,640,350,827,559,290,000,000,000,000,000,000,000 | 10 | check max member count in class |
void Phase2() final {
auto context = Deref(this->context);
Context::Scope context_scope{context};
auto name = GetKey(context);
auto object = GetTargetAndAlsoCheckForProxy();
// Delete key before transferring in, potentially freeing up some v8 heap
Unmaybe(object->Delete(context, name));
auto val_... | 0 | [
"CWE-913"
] | isolated-vm | 2646e6c1558bac66285daeab54c7d490ed332b15 | 159,748,924,538,245,680,000,000,000,000,000,000,000 | 12 | Don't invoke accessors or proxies via Reference functions |
void msix_unset_vector_notifiers(PCIDevice *dev)
{
int vector;
assert(dev->msix_vector_use_notifier &&
dev->msix_vector_release_notifier);
if ((dev->config[dev->msix_cap + MSIX_CONTROL_OFFSET] &
(MSIX_ENABLE_MASK | MSIX_MASKALL_MASK)) == MSIX_ENABLE_MASK) {
for (vector = 0; vect... | 0 | [] | qemu | 43b11a91dd861a946b231b89b7542856ade23d1b | 168,552,197,638,333,500,000,000,000,000,000,000,000 | 17 | msix: implement pba write (but read-only)
qpci_msix_pending() writes on pba region, causing qemu to SEGV:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff7fba8c0 (LWP 25882)]
0x0000000000000000 in ?? ()
(gdb) bt
#0 0x0000000000000000 in ()
#1 0x00005555556556c5 in memor... |
quicklistNode *quicklistBookmarkFind(quicklist *ql, const char *name) {
quicklistBookmark *bm = _quicklistBookmarkFindByName(ql, name);
if (!bm) return NULL;
return bm->node;
} | 0 | [
"CWE-190"
] | redis | f6a40570fa63d5afdd596c78083d754081d80ae3 | 55,595,367,760,202,440,000,000,000,000,000,000,000 | 5 | Fix ziplist and listpack overflows and truncations (CVE-2021-32627, CVE-2021-32628)
- fix possible heap corruption in ziplist and listpack resulting by trying to
allocate more than the maximum size of 4GB.
- prevent ziplist (hash and zset) from reaching size of above 1GB, will be
converted to HT encoding, that's n... |
void igmp6_event_query(struct sk_buff *skb)
{
struct inet6_dev *idev = __in6_dev_get(skb->dev);
if (!idev || idev->dead)
goto out;
spin_lock_bh(&idev->mc_query_lock);
if (skb_queue_len(&idev->mc_query_queue) < MLD_MAX_SKBS) {
__skb_queue_tail(&idev->mc_query_queue, skb);
if (!mod_delayed_work(mld_wq, &idev-... | 0 | [
"CWE-703"
] | linux | 2d3916f3189172d5c69d33065c3c21119fe539fc | 181,050,758,525,763,340,000,000,000,000,000,000,000 | 18 | ipv6: fix skb drops in igmp6_event_query() and igmp6_event_report()
While investigating on why a synchronize_net() has been added recently
in ipv6_mc_down(), I found that igmp6_event_query() and igmp6_event_report()
might drop skbs in some cases.
Discussion about removing synchronize_net() from ipv6_mc_down()
will ha... |
static int handle_invd(struct kvm_vcpu *vcpu)
{
return emulate_instruction(vcpu, 0) == EMULATE_DONE;
} | 0 | [] | kvm | a642fc305053cc1c6e47e4f4df327895747ab485 | 164,887,217,901,115,270,000,000,000,000,000,000,000 | 4 | kvm: vmx: handle invvpid vm exit gracefully
On systems with invvpid instruction support (corresponding bit in
IA32_VMX_EPT_VPID_CAP MSR is set) guest invocation of invvpid
causes vm exit, which is currently not handled and results in
propagation of unknown exit to userspace.
Fix this by installing an invvpid vm exit ... |
static void free_mem_cgroup_per_zone_info(struct mem_cgroup *memcg, int node)
{
kfree(memcg->info.nodeinfo[node]);
} | 0 | [
"CWE-264"
] | linux-2.6 | 1a5a9906d4e8d1976b701f889d8f35d54b928f25 | 313,694,702,492,063,600,000,000,000,000,000,000,000 | 4 | mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode
In some cases it may happen that pmd_none_or_clear_bad() is called with
the mmap_sem hold in read mode. In those cases the huge page faults can
allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a
false positive from pmd_bad(... |
void rerequest_full_maps() {
epoch_t first = requested_full_first;
epoch_t last = requested_full_last;
requested_full_first = 0;
requested_full_last = 0;
request_full_map(first, last);
} | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 80,909,268,766,766,760,000,000,000,000,000,000,000 | 7 | auth/cephx: add authorizer challenge
Allow the accepting side of a connection to reject an initial authorizer
with a random challenge. The connecting side then has to respond with an
updated authorizer proving they are able to decrypt the service's challenge
and that the new authorizer was produced for this specific ... |
CURLcode Curl_none_set_engine_default(struct Curl_easy *data UNUSED_PARAM)
{
(void)data;
return CURLE_NOT_BUILT_IN;
} | 0 | [
"CWE-290"
] | curl | b09c8ee15771c614c4bf3ddac893cdb12187c844 | 180,448,253,073,948,700,000,000,000,000,000,000,000 | 5 | vtls: add 'isproxy' argument to Curl_ssl_get/addsessionid()
To make sure we set and extract the correct session.
Reported-by: Mingtao Yang
Bug: https://curl.se/docs/CVE-2021-22890.html
CVE-2021-22890 |
static journal_t *ext4_get_journal(struct super_block *sb,
unsigned int journal_inum)
{
struct inode *journal_inode;
journal_t *journal;
BUG_ON(!EXT4_HAS_COMPAT_FEATURE(sb, EXT4_FEATURE_COMPAT_HAS_JOURNAL));
/* First, test for the existence of a valid inode on disk. Bad
* things happen if we iget() an u... | 0 | [
"CWE-20"
] | linux-2.6 | 4ec110281379826c5cf6ed14735e47027c3c5765 | 169,023,872,624,901,710,000,000,000,000,000,000,000 | 42 | ext4: Add sanity checks for the superblock before mounting the filesystem
This avoids insane superblock configurations that could lead to kernel
oops due to null pointer derefences.
http://bugzilla.kernel.org/show_bug.cgi?id=12371
Thanks to David Maciejak at Fortinet's FortiGuard Global Security
Research Team who di... |
int ber_sizeof_contextual_tag(int length)
{
return 1 + _ber_sizeof_length(length);
} | 0 | [
"CWE-476"
] | FreeRDP | 0dc22d5a30a1c7d146b2a835b2032668127c33e9 | 338,891,845,003,184,100,000,000,000,000,000,000,000 | 4 | Fixed a range of BER boundary encoding bugs which would occur when any NLA packet hit the 127 character mark. Removed ber#get_content_length as it was not behaving deterministically. |
static int rtnl_net_dumpid(struct sk_buff *skb, struct netlink_callback *cb)
{
struct rtnl_net_dump_cb net_cb = {
.tgt_net = sock_net(skb->sk),
.skb = skb,
.fillargs = {
.portid = NETLINK_CB(cb->skb).portid,
.seq = cb->nlh->nlmsg_seq,
.flags = NLM_F_MULTI,
.cmd = RTM_NEWNSID,
},
.idx = 0,
.s_id... | 0 | [
"CWE-200",
"CWE-190",
"CWE-326"
] | linux | 355b98553789b646ed97ad801a619ff898471b92 | 53,131,837,925,245,600,000,000,000,000,000,000,000 | 42 | netns: provide pure entropy for net_hash_mix()
net_hash_mix() currently uses kernel address of a struct net,
and is used in many places that could be used to reveal this
address to a patient attacker, thus defeating KASLR, for
the typical case (initial net namespace, &init_net is
not dynamically allocated)
I believe ... |
static apr_status_t buffer_output(request_rec *r,
const char *str, apr_size_t len)
{
conn_rec *c = r->connection;
ap_filter_t *f;
old_write_filter_ctx *ctx;
if (len == 0)
return APR_SUCCESS;
f = insert_old_write_filter(r);
ctx = f->ctx;
/* if the ... | 0 | [
"CWE-703"
] | httpd | be0f5335e3e73eb63253b050fdc23f252f5c8ae3 | 165,143,144,879,361,200,000,000,000,000,000,000,000 | 32 | *) SECURITY: CVE-2015-0253 (cve.mitre.org)
core: Fix a crash introduced in with ErrorDocument 400 pointing
to a local URL-path with the INCLUDES filter active, introduced
in 2.4.11. PR 57531. [Yann Ylavic]
Submitted By: ylavic
Committed By: covener
git-svn-id: https://svn.apache.org/repos/asf/http... |
static int mqueue_unlink(struct inode *dir, struct dentry *dentry)
{
struct inode *inode = d_inode(dentry);
dir->i_ctime = dir->i_mtime = dir->i_atime = current_time(dir);
dir->i_size -= DIRENT_SIZE;
drop_nlink(inode);
dput(dentry);
return 0;
} | 0 | [
"CWE-416"
] | linux | f991af3daabaecff34684fd51fac80319d1baad1 | 308,052,805,165,133,660,000,000,000,000,000,000,000 | 10 | mqueue: fix a use-after-free in sys_mq_notify()
The retry logic for netlink_attachskb() inside sys_mq_notify()
is nasty and vulnerable:
1) The sock refcnt is already released when retry is needed
2) The fd is controllable by user-space because we already
release the file refcnt
so we when retry but the fd has bee... |
rfbNumCodedRectsTight(rfbClientPtr cl,
int x,
int y,
int w,
int h)
{
int maxRectSize, maxRectWidth;
int subrectMaxWidth, subrectMaxHeight;
/* No matter how many rectangles we will send if LastRect markers
are use... | 0 | [] | libvncserver | 804335f9d296440bb708ca844f5d89b58b50b0c6 | 81,721,385,069,536,930,000,000,000,000,000,000,000 | 26 | Thread safety for zrle, zlib, tight.
Proposed tight security type fix for debian bug 517422. |
conv_ext0be(const UChar* s, const UChar* end, UChar* conv)
{
while (s < end) {
*conv++ = '\0';
*conv++ = *s++;
}
} | 0 | [
"CWE-416",
"CWE-200"
] | oniguruma | 0f7f61ed1b7b697e283e37bd2d731d0bd57adb55 | 62,372,224,352,063,480,000,000,000,000,000,000,000 | 7 | Fix CVE-2019-13224: don't allow different encodings for onig_new_deluxe() |
static void skcipher_release(void *private)
{
struct skcipher_tfm *tfm = private;
crypto_free_skcipher(tfm->skcipher);
kfree(tfm);
} | 0 | [] | linux | 4f0414e54e4d1893c6f08260693f8ef84c929293 | 279,416,281,595,079,530,000,000,000,000,000,000,000 | 7 | crypto: algif_skcipher - Load TX SG list after waiting
We need to load the TX SG list in sendmsg(2) after waiting for
incoming data, not before.
Cc: stable@vger.kernel.org
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Tested-by: Dmitry Vyukov <dvyukov@google.c... |
static int ext4_zeroout_es(struct inode *inode, struct ext4_extent *ex)
{
ext4_lblk_t ee_block;
ext4_fsblk_t ee_pblock;
unsigned int ee_len;
ee_block = le32_to_cpu(ex->ee_block);
ee_len = ext4_ext_get_actual_len(ex);
ee_pblock = ext4_ext_pblock(ex);
if (ee_len == 0)
return 0;
return ext4_es_insert_ext... | 0 | [
"CWE-362"
] | linux | ea3d7209ca01da209cda6f0dea8be9cc4b7a933b | 278,479,863,660,086,400,000,000,000,000,000,000,000 | 16 | 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... |
void Compute(OpKernelContext* ctx) override {
const Tensor& alg_tensor = ctx->input(1);
const Tensor& shape_tensor = ctx->input(2);
const Tensor& counts_tensor = ctx->input(3);
const Tensor& probs_tensor = ctx->input(4);
tensorflow::BCast bcast(counts_tensor.shape().dim_sizes(),
... | 0 | [
"CWE-703",
"CWE-197"
] | tensorflow | ca8c013b5e97b1373b3bb1c97ea655e69f31a575 | 321,599,814,077,056,200,000,000,000,000,000,000,000 | 98 | Prevent integer truncation from 64 to 32 bits.
The `tensorflow::Shard` functions last argument must be a 2 argument function where both arguments are `int64` (`long long`, 64 bits). However, there are usages where code passes in a function where arguments are `int` or `int32` (32 bits). In these cases, it is possible ... |
static void prb_clear_rxhash(struct tpacket_kbdq_core *pkc,
struct tpacket3_hdr *ppd)
{
ppd->hv1.tp_rxhash = 0;
} | 0 | [
"CWE-416",
"CWE-362"
] | linux | 84ac7260236a49c79eede91617700174c2c19b0c | 197,662,638,199,655,470,000,000,000,000,000,000,000 | 5 | packet: fix race condition in packet_set_ring
When packet_set_ring creates a ring buffer it will initialize a
struct timer_list if the packet version is TPACKET_V3. This value
can then be raced by a different thread calling setsockopt to
set the version to TPACKET_V1 before packet_set_ring has finished.
This leads to... |
void skipRData()
{
int toskip = get16BitInt();
moveOffset(toskip);
} | 0 | [
"CWE-399"
] | pdns | adb10be102ddd4d2baf7a8adbb5673946fe5e555 | 35,606,507,150,229,100,000,000,000,000,000,000,000 | 5 | fix forward reference-check in getLabelFromContent() |
cdc_ncm_speed_change(struct usbnet *dev,
struct usb_cdc_speed_change *data)
{
uint32_t rx_speed = le32_to_cpu(data->DLBitRRate);
uint32_t tx_speed = le32_to_cpu(data->ULBitRate);
/*
* Currently the USB-NET API does not support reporting the actual
* device speed. Do print it instead.
*/
if ((tx_speed ... | 0 | [
"CWE-703"
] | linux | 4d06dd537f95683aba3651098ae288b7cbff8274 | 84,064,835,787,041,830,000,000,000,000,000,000,000 | 22 | cdc_ncm: do not call usbnet_link_change from cdc_ncm_bind
usbnet_link_change will call schedule_work and should be
avoided if bind is failing. Otherwise we will end up with
scheduled work referring to a netdev which has gone away.
Instead of making the call conditional, we can just defer
it to usbnet_probe, using the... |
static int s6x0_read_mac_address(struct dvb_usb_device *d, u8 mac[6])
{
int i, ret;
u8 ibuf[] = { 0 }, obuf[] = { 0 };
u8 eeprom[256], eepromline[16];
struct i2c_msg msg[] = {
{
.addr = 0xa0 >> 1,
.flags = 0,
.buf = obuf,
.len = 1,
}, {
.addr = 0xa0 >> 1,
.flags = I2C_M_RD,
.buf = ibuf,
... | 0 | [
"CWE-476",
"CWE-119"
] | linux | 606142af57dad981b78707234cfbd15f9f7b7125 | 88,352,406,021,957,530,000,000,000,000,000,000,000 | 39 | [media] dw2102: don't do DMA on stack
On Kernel 4.9, WARNINGs about doing DMA on stack are hit at
the dw2102 driver: one in su3000_power_ctrl() and the other in tt_s2_4600_frontend_attach().
Both were due to the use of buffers on the stack as parameters to
dvb_usb_generic_rw() and the resulting attempt to do DMA with... |
display_trace_info (struct dwarf_section *section, void *file)
{
return process_debug_info (section, file, section->abbrev_sec, false, true);
} | 0 | [
"CWE-703"
] | binutils-gdb | 695c6dfe7e85006b98c8b746f3fd5f913c94ebff | 306,753,449,880,916,820,000,000,000,000,000,000,000 | 4 | PR29370, infinite loop in display_debug_abbrev
The PR29370 testcase is a fuzzed object file with multiple
.trace_abbrev sections. Multiple .trace_abbrev or .debug_abbrev
sections are not a violation of the DWARF standard. The DWARF5
standard even gives an example of multiple .debug_abbrev sections
contained in group... |
static void omninet_process_read_urb(struct urb *urb)
{
struct usb_serial_port *port = urb->context;
const struct omninet_header *hdr = urb->transfer_buffer;
const unsigned char *data;
size_t data_len;
if (urb->actual_length <= OMNINET_HEADERLEN || !hdr->oh_len)
return;
data = (char *)urb->transfer_buffer + O... | 0 | [
"CWE-399",
"CWE-404"
] | linux | 30572418b445d85fcfe6c8fe84c947d2606767d8 | 322,318,816,258,837,030,000,000,000,000,000,000,000 | 16 | USB: serial: omninet: fix reference leaks at open
This driver needlessly took another reference to the tty on open, a
reference which was then never released on close. This lead to not just
a leak of the tty, but also a driver reference leak that prevented the
driver from being unloaded after a port had once been open... |
static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
{
u32 seq;
void *data;
int err;
struct audit_buffer *ab;
u16 msg_type = nlh->nlmsg_type;
struct audit_sig_info *sig_data;
char *ctx = NULL;
u32 len;
err = audit_netlink_ok(skb, msg_type);
if (err)
return err;
/* As soon... | 0 | [
"CWE-264"
] | net | 90f62cf30a78721641e08737bda787552428061e | 184,605,305,480,384,960,000,000,000,000,000,000,000 | 269 | net: Use netlink_ns_capable to verify the permisions of netlink messages
It is possible by passing a netlink socket to a more privileged
executable and then to fool that executable into writing to the socket
data that happens to be valid netlink message to do something that
privileged executable did not intend to do.
... |
ignorableWhitespaceDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *ch, int len)
{
char output[40];
int i;
callbacks++;
if (quiet)
return;
for (i = 0;(i<len) && (i < 30);i++)
output[i] = ch[i];
output[i] = 0;
fprintf(SAXdebug, "SAX.ignorableWhitespace(%s, %d)\n", output, len);
} | 0 | [
"CWE-125"
] | libxml2 | a820dbeac29d330bae4be05d9ecd939ad6b4aa33 | 330,557,541,846,714,950,000,000,000,000,000,000,000 | 13 | Bug 758605: Heap-based buffer overread in xmlDictAddString <https://bugzilla.gnome.org/show_bug.cgi?id=758605>
Reviewed by David Kilzer.
* HTMLparser.c:
(htmlParseName): Add bounds check.
(htmlParseNameComplex): Ditto.
* result/HTML/758605.html: Added.
* result/HTML/758605.html.err: Added.
* result/HTML/758605.html.s... |
ofpact_decode_raw(enum ofp_version ofp_version,
const struct ofp_action_header *oah, size_t length,
const struct ofpact_raw_instance **instp)
{
const struct ofpact_raw_instance *inst;
struct ofpact_hdrs hdrs;
*instp = NULL;
if (length < sizeof *oah) {
return ... | 0 | [
"CWE-125"
] | ovs | 9237a63c47bd314b807cda0bd2216264e82edbe8 | 33,135,951,806,281,207,000,000,000,000,000,000,000 | 48 | ofp-actions: Avoid buffer overread in BUNDLE action decoding.
Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9052
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org> |
static void test_conversion()
{
MYSQL_STMT *stmt;
const char *stmt_text;
int rc;
MYSQL_BIND my_bind[1];
uchar buff[4];
ulong length;
myheader("test_conversion");
stmt_text= "DROP TABLE IF EXISTS t1";
rc= mysql_real_query(mysql, stmt_text, strlen(stmt_text));
myquery(rc);
stmt_text= "CREATE TABLE... | 0 | [
"CWE-416"
] | server | eef21014898d61e77890359d6546d4985d829ef6 | 41,066,657,707,575,853,000,000,000,000,000,000,000 | 66 | MDEV-11933 Wrong usage of linked list in mysql_prune_stmt_list
mysql_prune_stmt_list() was walking the list following
element->next pointers, but inside the loop it was invoking
list_add(element) that modified element->next. So, mysql_prune_stmt_list()
failed to visit and reset all elements, and some of them were left... |
static void cli_parseres_special(uint32_t base, uint32_t rva, fmap_t *map, struct cli_exe_section *exe_sections, uint16_t nsections, size_t fsize, uint32_t hdr_size, unsigned int level, uint32_t type, unsigned int *maxres, struct swizz_stats *stats) {
unsigned int err = 0, i;
const uint8_t *resdir;
const u... | 0 | [
"CWE-119",
"CWE-787"
] | clamav-devel | fc3794a54d2affe5770c1f876484a871c783e91e | 147,549,941,241,796,820,000,000,000,000,000,000,000 | 90 | Merge fix from security/bb11155 branch |
InputSource::findLast(char const* start_chars,
qpdf_offset_t offset, size_t len,
Finder& finder)
{
bool found = false;
qpdf_offset_t after_found_offset = 0;
qpdf_offset_t cur_offset = offset;
size_t cur_len = len;
while (this->findFirst(start_chars, cur_of... | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 62,307,276,141,685,660,000,000,000,000,000,000,000 | 28 | Fix sign and conversion warnings (major)
This makes all integer type conversions that have potential data loss
explicit with calls that do range checks and raise an exception. After
this commit, qpdf builds with no warnings when -Wsign-conversion
-Wconversion is used with gcc or clang or when -W3 -Wd4800 is used
with ... |
void LinkResolver::resolve_invokespecial(CallInfo& result, Handle recv, constantPoolHandle pool, int index, TRAPS) {
KlassHandle resolved_klass;
Symbol* method_name = NULL;
Symbol* method_signature = NULL;
KlassHandle current_klass;
resolve_pool(resolved_klass, method_name, method_signature, current_klass,... | 0 | [] | jdk8u | f14e35d20e1a4d0f507f05838844152f2242c6d3 | 20,394,886,326,677,780,000,000,000,000,000,000,000 | 8 | 8281866: Enhance MethodHandle invocations
Reviewed-by: andrew
Backport-of: d974d9da365f787f67971d88c79371c8b0769f75 |
static void bn_GF2m_mul_1x1(BN_ULONG *r1, BN_ULONG *r0, const BN_ULONG a,
const BN_ULONG b)
{
register BN_ULONG h, l, s;
BN_ULONG tab[8], top2b = a >> 30;
register BN_ULONG a1, a2, a4;
a1 = a & (0x3FFFFFFF);
a2 = a1 << 1;
a4 = a2 << 1;
tab[0] = 0;
tab[1] = a... | 0 | [
"CWE-399"
] | openssl | f61bbf8da532038ed0eae16a9a11771f3da22d30 | 208,927,753,133,427,300,000,000,000,000,000,000,000 | 67 | bn/bn_gf2m.c: avoid infinite loop wich malformed ECParamters.
CVE-2015-1788
Reviewed-by: Matt Caswell <matt@openssl.org>
(cherry picked from commit 4924b37ee01f71ae19c94a8934b80eeb2f677932) |
static Image *ReadXBMImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
char
buffer[MagickPathExtent],
name[MagickPathExtent];
Image
*image;
int
c;
MagickBooleanType
status;
register ssize_t
i,
x;
register Quantum
*q;
register unsigned char
*p;
short... | 0 | [
"CWE-200",
"CWE-703"
] | ImageMagick | 216d117f05bff87b9dc4db55a1b1fadb38bcb786 | 319,167,902,770,215,400,000,000,000,000,000,000,000 | 241 | XBM coder leaves the hex image data uninitialized if hex value of the pixel is negative |
addlists (char **old, char **new)
{
size_t i;
if (old == NULL || new == NULL)
return NULL;
for (i = 0; new[i] != NULL; ++i)
{
old = enlist(old, new[i], strlen(new[i]));
if (old == NULL)
break;
}
return old;
} | 0 | [
"CWE-189"
] | grep | cbbc1a45b9f843c811905c97c90a5d31f8e6c189 | 311,109,581,285,701,250,000,000,000,000,000,000,000 | 14 | grep: fix some core dumps with long lines etc.
These problems mostly occur because the code attempts to stuff
sizes into int or into unsigned int; this doesn't work on most
64-bit hosts and the errors can lead to core dumps.
* NEWS: Document this.
* src/dfa.c (token): Typedef to ptrdiff_t, since the enum's
range could... |
static int cgroup_procs_show(struct seq_file *s, void *v)
{
seq_printf(s, "%d\n", task_pid_vnr(v));
return 0;
} | 0 | [
"CWE-416"
] | linux | a06247c6804f1a7c86a2e5398a4c1f1db1471848 | 4,996,496,054,600,746,000,000,000,000,000,000,000 | 5 | psi: Fix uaf issue when psi trigger is destroyed while being polled
With write operation on psi files replacing old trigger with a new one,
the lifetime of its waitqueue is totally arbitrary. Overwriting an
existing trigger causes its waitqueue to be freed and pending poll()
will stumble on trigger->event_wait which w... |
static int slab_memory_callback(struct notifier_block *self,
unsigned long action, void *arg)
{
int ret = 0;
switch (action) {
case MEM_GOING_ONLINE:
ret = slab_mem_going_online_callback(arg);
break;
case MEM_GOING_OFFLINE:
ret = slab_mem_going_offline_callback(arg);
break;
case MEM_OFFLINE:
case MEM... | 0 | [
"CWE-189"
] | linux | f8bd2258e2d520dff28c855658bd24bdafb5102d | 4,820,918,608,666,375,000,000,000,000,000,000,000 | 24 | remove div_long_long_rem
x86 is the only arch right now, which provides an optimized for
div_long_long_rem and it has the downside that one has to be very careful that
the divide doesn't overflow.
The API is a little akward, as the arguments for the unsigned divide are
signed. The signed version also doesn't handle ... |
void ZrtpStateClass::evWaitClearAck(void) {
DEBUGOUT((cout << "Checking for match in ClearAck.\n"));
// char *msg, first, last, middle;
// uint8_t *pkt;
//
// if (event->type == ZrtpPacket) {
// pkt = event->packet;
// msg = (char *)pkt + 4;
//
// first = tolower(*msg);
// middle = tolower(*(m... | 0 | [
"CWE-119"
] | ZRTPCPP | c8617100f359b217a974938c5539a1dd8a120b0e | 311,696,283,992,540,760,000,000,000,000,000,000,000 | 43 | Fix vulnerabilities found and reported by Mark Dowd
- limit length of memcpy
- limit number of offered algorithms in Hello packet
- length check in PING packet
- fix a small coding error |
BOOL license_read_platform_challenge_packet(rdpLicense* license, wStream* s)
{
BYTE MacData[16];
UINT32 ConnectFlags = 0;
DEBUG_LICENSE("Receiving Platform Challenge Packet");
if (Stream_GetRemainingLength(s) < 4)
return FALSE;
Stream_Read_UINT32(s, ConnectFlags); /* ConnectFlags, Reserved (4 bytes) */
/* E... | 0 | [] | FreeRDP | f1d6afca6ae620f9855a33280bdc6f3ad9153be0 | 173,863,501,311,987,070,000,000,000,000,000,000,000 | 43 | Fix CVE-2014-0791
This patch fixes CVE-2014-0791, the remaining length in the stream is checked
before doing some malloc(). |
static void download_one_url(const char *url)
{
bool use_proxy; /* Use proxies if env vars are set */
int redir_limit;
len_and_sockaddr *lsa;
FILE *sfp; /* socket to web/ftp server */
FILE *dfp; /* socket to ftp server (data) */
char *fname_o... | 0 | [
"CWE-295"
] | busybox | 45fa3f18adf57ef9d743038743d9c90573aeeb91 | 190,800,341,094,723,900,000,000,000,000,000,000,000 | 378 | wget: implement TLS verification with ENABLE_FEATURE_WGET_OPENSSL
When ENABLE_FEATURE_WGET_OPENSSL is enabled, correctly implement TLS
verification by default. And only ignore verification errors, if
--no-check-certificate was passed.
Also note, that previously OPENSSL implementation did not implement
TLS verificatio... |
match(struct magic_set *ms, struct magic *magic, uint32_t nmagic,
const struct buffer *b, size_t offset, int mode, int text,
int flip, uint16_t *indir_count, uint16_t *name_count,
int *printed_something, int *need_separator, int *returnval,
int *found_match)
{
uint32_t magindex = 0;
unsigned int cont_... | 0 | [
"CWE-787"
] | php-src | ca6d511fa54b34d5b75bf120a86482a1b9e1e686 | 74,562,432,509,768,470,000,000,000,000,000,000,000 | 275 | Fix #81723: Memory corruption in finfo_buffer()
We need to use the same memory allocator throughout. |
static inline void flag_success_on_conn(struct rtrs_clt_con *con)
{
struct rtrs_clt_path *clt_path = to_clt_path(con->c.path);
atomic_inc(&clt_path->connected_cnt);
con->cm_err = 1;
} | 0 | [
"CWE-415"
] | linux | 8700af2cc18c919b2a83e74e0479038fd113c15d | 171,633,782,775,648,460,000,000,000,000,000,000,000 | 7 | RDMA/rtrs-clt: Fix possible double free in error case
Callback function rtrs_clt_dev_release() for put_device() calls kfree(clt)
to free memory. We shouldn't call kfree(clt) again, and we can't use the
clt after kfree too.
Replace device_register() with device_initialize() and device_add() so that
dev_set_name can() ... |
int sqlite3Fts3MsrIncrStart(
Fts3Table *p, /* Virtual table handle */
Fts3MultiSegReader *pCsr, /* Cursor object */
int iCol, /* Column to match on. */
const char *zTerm, /* Term to iterate through a doclist for */
int nTerm /* N... | 0 | [
"CWE-787"
] | sqlite | c72f2fb7feff582444b8ffdc6c900c69847ce8a9 | 16,252,976,496,405,114,000,000,000,000,000,000,000 | 42 | More improvements to shadow table corruption detection in FTS3.
FossilOrigin-Name: 51525f9c3235967bc00a090e84c70a6400698c897aa4742e817121c725b8c99d |
CImg<T>& rotate_object3d(const float x, const float y, const float z, const float w,
const bool is_quaternion=false) {
return get_rotate_object3d(x,y,z,w,is_quaternion).move_to(*this);
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 76,822,067,541,875,920,000,000,000,000,000,000,000 | 4 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
static void resp_add_iov(mc_resp *resp, const void *buf, int len) {
assert(resp->iovcnt < MC_RESP_IOVCOUNT);
int x = resp->iovcnt;
resp->iov[x].iov_base = (void *)buf;
resp->iov[x].iov_len = len;
resp->iovcnt++;
resp->tosend += len;
} | 0 | [] | memcached | f249724cedcab6605ca8a0769ac4b356a8124f63 | 76,810,596,619,541,820,000,000,000,000,000,000,000 | 8 | crash fix: errstr wasn't initialized in metaget
if meta_flag_preparse bailed out early it would try to read
uninitialized memory. |
static int dissect_dvb_s2_bb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
{
proto_item *ti;
proto_tree *dvb_s2_bb_tree;
guint8 input8, matype1;
guint8 sync_flag = 0;
guint16 input16, bb_data_len = 0, user_packet_length;
int sub_dissected = 0... | 1 | [
"CWE-835"
] | wireshark | 0137c24d60934f131b25506a88c9464e4dc827de | 210,796,043,791,253,980,000,000,000,000,000,000,000 | 147 | DVB-S2-BB: Prevent infinite loop
Commit 4bf4ee88f0544727e7f89f3f288c6afd2f650a4c removed an else
statement that broke out of the BBFrame processing loop. Without
it, infinite loops might be possible if the GSE frames have bit errors
in the length field. |
struct dentry *ovl_dentry_real(struct dentry *dentry)
{
struct ovl_entry *oe = dentry->d_fsdata;
struct dentry *realdentry;
realdentry = ovl_upperdentry_dereference(oe);
if (!realdentry)
realdentry = oe->lowerdentry;
return realdentry;
} | 0 | [
"CWE-284",
"CWE-264"
] | linux | 69c433ed2ecd2d3264efd7afec4439524b319121 | 50,373,083,053,212,330,000,000,000,000,000,000,000 | 11 | fs: limit filesystem stacking depth
Add a simple read-only counter to super_block that indicates how deep this
is in the stack of filesystems. Previously ecryptfs was the only stackable
filesystem and it explicitly disallowed multiple layers of itself.
Overlayfs, however, can be stacked recursively and also may be s... |
g_keyfile_settings_backend_init (GKeyfileSettingsBackend *kfsb)
{
} | 0 | [
"CWE-732"
] | glib | 5e4da714f00f6bfb2ccd6d73d61329c6f3a08429 | 53,477,060,608,957,080,000,000,000,000,000,000,000 | 3 | keyfile settings: Use tighter permissions
When creating directories, create them with 700 permissions,
instead of 777.
Closes: #1658 |
static void binder_set_nice(long nice)
{
long min_nice;
if (can_nice(current, nice)) {
set_user_nice(current, nice);
return;
}
min_nice = rlimit_to_nice(rlimit(RLIMIT_NICE));
binder_debug(BINDER_DEBUG_PRIORITY_CAP,
"%d: nice value %ld not allowed use %ld instead\n",
current->pid, nice, min_nice... | 0 | [
"CWE-416"
] | linux | 7bada55ab50697861eee6bb7d60b41e68a961a9c | 87,067,926,323,589,760,000,000,000,000,000,000,000 | 17 | binder: fix race that allows malicious free of live buffer
Malicious code can attempt to free buffers using the BC_FREE_BUFFER
ioctl to binder. There are protections against a user freeing a buffer
while in use by the kernel, however there was a window where
BC_FREE_BUFFER could be used to free a recently allocated bu... |
static void __scalar64_min_max_lsh(struct bpf_reg_state *dst_reg,
u64 umin_val, u64 umax_val)
{
/* Special case <<32 because it is a common compiler pattern to sign
* extend subreg by doing <<32 s>>32. In this case if 32bit bounds are
* positive we know this shift will also be positive so we can track
* b... | 0 | [
"CWE-119",
"CWE-681",
"CWE-787"
] | linux | 5b9fbeb75b6a98955f628e205ac26689bcb1383e | 315,542,418,545,239,400,000,000,000,000,000,000,000 | 29 | bpf: Fix scalar32_min_max_or bounds tracking
Simon reported an issue with the current scalar32_min_max_or() implementation.
That is, compared to the other 32 bit subreg tracking functions, the code in
scalar32_min_max_or() stands out that it's using the 64 bit registers instead
of 32 bit ones. This leads to bounds tra... |
static bool normalize_http_method(char *method) {
static const char *names[6] = {"DELETE", "GET", "HEAD", "OPTIONS", "POST", "PUT"};
for (size_t i = 0; i < 6; i++) {
auto name = names[i];
if (strcasecmp(method, name) == 0) {
if (strcmp(method, name) == 0) {
return false;
}
// Not... | 0 | [
"CWE-94"
] | js-compute-runtime | 65524ffc962644e9fc39f4b368a326b6253912a9 | 131,348,064,626,528,030,000,000,000,000,000,000,000 | 19 | use rangom_get instead of arc4random as arc4random does not work correctly with wizer
wizer causes the seed in arc4random to be the same between executions which is not random |
void next_row_bottom()
{
if (at_partition_end)
return;
if (cursor.next())
{
at_partition_end= true;
return;
}
add_value_to_items();
} | 0 | [] | server | ba4927e520190bbad763bb5260ae154f29a61231 | 143,410,164,497,764,740,000,000,000,000,000,000,000 | 14 | MDEV-19398: Assertion `item1->type() == Item::FIELD_ITEM ...
Window Functions code tries to minimize the number of times it
needs to sort the select's resultset by finding "compatible"
OVER (PARTITION BY ... ORDER BY ...) clauses.
This employs compare_order_elements(). That function assumed that
the order expressions... |
bfd_validate_config(void)
{
start_bfd(NULL);
} | 0 | [
"CWE-200"
] | keepalived | 26c8d6374db33bcfcdcd758b1282f12ceef4b94f | 110,442,647,239,277,920,000,000,000,000,000,000,000 | 4 | Disable fopen_safe() append mode by default
If a non privileged user creates /tmp/keepalived.log and has it open
for read (e.g. tail -f), then even though keepalived will change the
owner to root and remove all read/write permissions from non owners,
the application which already has the file open will be able to read... |
static int store_xauthority(void) {
// put a copy of .Xauthority in XAUTHORITY_FILE
fs_build_mnt_dir();
char *src;
char *dest = RUN_XAUTHORITY_FILE;
// create an empty file
FILE *fp = fopen(dest, "w");
if (fp) {
fprintf(fp, "\n");
SET_PERMS_STREAM(fp, getuid(), getgid(), 0600);
fclose(fp);
}
if (aspri... | 1 | [
"CWE-284",
"CWE-269"
] | firejail | 903fd8a0789ca3cc3c21d84cd0282481515592ef | 29,727,012,612,147,280,000,000,000,000,000,000,000 | 53 | security fix |
compose_group_nonknockout_noblend_general(byte *tos_ptr, bool tos_isolated, int tos_planestride, int tos_rowstride, byte alpha, byte shape, gs_blend_mode_t blend_mode, bool tos_has_shape,
int tos_shape_offset, int tos_alpha_g_offset, int tos_tag_offset, bool tos_has_tag,
byte *nos_ptr, bool ... | 0 | [
"CWE-476"
] | ghostpdl | 7870f4951bcc6a153f317e3439e14d0e929fd231 | 195,191,570,098,281,820,000,000,000,000,000,000,000 | 15 | Bug 701795: Segv due to image mask issue |
ftrace_hash_move(struct ftrace_ops *ops, int enable,
struct ftrace_hash **dst, struct ftrace_hash *src)
{
struct ftrace_func_entry *entry;
struct hlist_node *tn;
struct hlist_head *hhd;
struct ftrace_hash *old_hash;
struct ftrace_hash *new_hash;
unsigned long key;
int size = src->count;
int bits = 0;
int re... | 0 | [
"CWE-703"
] | linux | 6a76f8c0ab19f215af2a3442870eeb5f0e81998d | 95,873,965,718,237,540,000,000,000,000,000,000,000 | 75 | tracing: Fix possible NULL pointer dereferences
Currently set_ftrace_pid and set_graph_function files use seq_lseek
for their fops. However seq_open() is called only for FMODE_READ in
the fops->open() so that if an user tries to seek one of those file
when she open it for writing, it sees NULL seq_file and then panic... |
get_credentials_generation (GoaProvider *provider)
{
return 3;
} | 0 | [
"CWE-310"
] | gnome-online-accounts | edde7c63326242a60a075341d3fea0be0bc4d80e | 304,782,209,484,337,800,000,000,000,000,000,000,000 | 4 | Guard against invalid SSL certificates
None of the branded providers (eg., Google, Facebook and Windows Live)
should ever have an invalid certificate. So set "ssl-strict" on the
SoupSession object being used by GoaWebView.
Providers like ownCloud and Exchange might have to deal with
certificates that are not up to th... |
func_call(
char_u *name,
typval_T *args,
partial_T *partial,
dict_T *selfdict,
typval_T *rettv)
{
list_T *l = args->vval.v_list;
listitem_T *item;
typval_T argv[MAX_FUNC_ARGS + 1];
int argc = 0;
int r = 0;
CHECK_LIST_MATERIALIZE(l);
FOR_ALL_LIST_ITEMS(l, item)
{
i... | 0 | [
"CWE-416"
] | vim | 9c23f9bb5fe435b28245ba8ac65aa0ca6b902c04 | 266,739,375,189,994,250,000,000,000,000,000,000,000 | 45 | patch 8.2.3902: Vim9: double free with nested :def function
Problem: Vim9: double free with nested :def function.
Solution: Pass "line_to_free" from compile_def_function() and make sure
cmdlinep is valid. |
static void ReadPDFInfo(const ImageInfo *image_info,Image *image,
PDFInfo *pdf_info,ExceptionInfo *exception)
{
#define CMYKProcessColor "CMYKProcessColor"
#define CropBox "CropBox"
#define DefaultCMYK "DefaultCMYK"
#define DeviceCMYK "DeviceCMYK"
#define MediaBox "MediaBox"
#define PDFRotate "Rotate"
#define S... | 0 | [
"CWE-190"
] | ImageMagick | 872ffe6d0131beec8b47568a4874ffaca91a872e | 192,176,249,644,578,600,000,000,000,000,000,000,000 | 176 | https://github.com/ImageMagick/ImageMagick/issues/1753 |
void tcd_dump(FILE *fd, opj_tcd_t *tcd, opj_tcd_image_t * img)
{
int tileno, compno, resno, bandno, precno;/*, cblkno;*/
fprintf(fd, "image {\n");
fprintf(fd, " tw=%d, th=%d x0=%d x1=%d y0=%d y1=%d\n",
img->tw, img->th, tcd->image->x0, tcd->image->x1, tcd->image->y0,
tcd->image->y1... | 0 | [
"CWE-119",
"CWE-787"
] | openjpeg | 397f62c0a838e15d667ef50e27d5d011d2c79c04 | 72,963,578,272,051,790,000,000,000,000,000,000,000 | 60 | Fix write heap buffer overflow in opj_mqc_byteout(). Discovered by Ke Liu of Tencent's Xuanwu LAB (#835) |
void MongoStatusInfo::fromStatus(JSContext* cx, Status status, JS::MutableHandleValue value) {
auto scope = getScope(cx);
JS::RootedValue undef(cx);
undef.setUndefined();
JS::AutoValueArray<1> args(cx);
ValueReader(cx, args[0]).fromStringData(status.reason());
JS::RootedObject error(cx);
s... | 1 | [] | mongo | c53b2f233687487ef70398153af3d8d34bbc21d1 | 215,295,602,708,671,060,000,000,000,000,000,000,000 | 37 | SERVER-39481 don't expose a MongoStatus constructor in JS |
void bnep_net_setup(struct net_device *dev)
{
memset(dev->broadcast, 0xff, ETH_ALEN);
dev->addr_len = ETH_ALEN;
ether_setup(dev);
dev->priv_flags &= ~IFF_TX_SKB_SHARING;
dev->netdev_ops = &bnep_netdev_ops;
dev->watchdog_timeo = HZ * 2;
} | 0 | [
"CWE-703",
"CWE-264"
] | linux | 550fd08c2cebad61c548def135f67aba284c6162 | 249,781,826,804,459,330,000,000,000,000,000,000,000 | 12 | net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared
After the last patch, We are left in a state in which only drivers calling
ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real
hardware call ether_setup for their net_devices and don't hold any state in
their skbs. There... |
int dtls1_read_bytes(SSL *s, int type, unsigned char *buf, int len, int peek)
{
int al,i,j,ret;
unsigned int n;
SSL3_RECORD *rr;
void (*cb)(const SSL *ssl,int type2,int val)=NULL;
if (s->s3->rbuf.buf == NULL) /* Not initialized yet */
if (!ssl3_setup_buffers(s))
return(-1);
/* XXX: check what the secon... | 0 | [] | openssl | 4817504d069b4c5082161b02a22116ad75f822b1 | 116,673,026,270,856,510,000,000,000,000,000,000,000 | 628 | PR: 2658
Submitted by: Robin Seggelmann <seggelmann@fh-muenster.de>
Reviewed by: steve
Support for TLS/DTLS heartbeats. |
enum ha_base_keytype key_type() const { return HA_KEYTYPE_BIT; } | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 208,374,627,602,299,720,000,000,000,000,000,000,000 | 1 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... |
static ssize_t fuse_fill_write_pages(struct fuse_req *req,
struct address_space *mapping,
struct iov_iter *ii, loff_t pos)
{
struct fuse_conn *fc = get_fuse_conn(mapping->host);
unsigned offset = pos & (PAGE_CACHE_SIZE - 1);
size_t count = 0;
int err;
req->in.argpages = 1;
req->page_descs[0].... | 1 | [
"CWE-399",
"CWE-835"
] | linux | 3ca8138f014a913f98e6ef40e939868e1e9ea876 | 15,802,608,735,146,314,000,000,000,000,000,000,000 | 63 | fuse: break infinite loop in fuse_fill_write_pages()
I got a report about unkillable task eating CPU. Further
investigation shows, that the problem is in the fuse_fill_write_pages()
function. If iov's first segment has zero length, we get an infinite
loop, because we never reach iov_iter_advance() call.
Fix this by c... |
GF_Box *stco_New()
{
ISOM_DECL_BOX_ALLOC(GF_ChunkOffsetBox, GF_ISOM_BOX_TYPE_STCO);
return (GF_Box *)tmp;
} | 0 | [
"CWE-400",
"CWE-401"
] | gpac | d2371b4b204f0a3c0af51ad4e9b491144dd1225c | 291,860,710,089,241,840,000,000,000,000,000,000,000 | 5 | prevent dref memleak on invalid input (#1183) |
OPJ_SIZE_T opj_tcd_get_encoded_tile_size(opj_tcd_t *p_tcd)
{
OPJ_UINT32 i;
OPJ_SIZE_T l_data_size = 0;
opj_image_comp_t * l_img_comp = 00;
opj_tcd_tilecomp_t * l_tilec = 00;
OPJ_UINT32 l_size_comp, l_remaining;
l_tilec = p_tcd->tcd_image->tiles->comps;
l_img_comp = p_tcd->image->comps;
... | 0 | [
"CWE-787"
] | openjpeg | 05f9b91e60debda0e83977e5e63b2e66486f7074 | 216,118,520,754,968,080,000,000,000,000,000,000,000 | 30 | opj_tcd_init_tile(): avoid integer overflow
That could lead to later assertion failures.
Fixes #1231 / CVE-2020-8112 |
verifier_load_method (VerifyContext *ctx, int token, const char *opcode) {
MonoMethod* method;
if (!IS_METHOD_DEF_OR_REF_OR_SPEC (token) || !token_bounds_check (ctx->image, token)) {
ADD_VERIFY_ERROR2 (ctx, g_strdup_printf ("Invalid method token 0x%08x for %s at 0x%04x", token, opcode, ctx->ip_offset), MONO_EXCEP... | 0 | [
"CWE-20"
] | mono | 4905ef1130feb26c3150b28b97e4a96752e0d399 | 139,305,684,187,244,280,000,000,000,000,000,000,000 | 20 | Handle invalid instantiation of generic methods.
* verify.c: Add new function to internal verifier API to check
method instantiations.
* reflection.c (mono_reflection_bind_generic_method_parameters):
Check the instantiation before returning it.
Fixes #655847 |
void Chapters::Display::Init() {
m_string = NULL;
m_language = NULL;
m_country = NULL;
} | 0 | [
"CWE-20"
] | libvpx | 34d54b04e98dd0bac32e9aab0fbda0bf501bc742 | 292,089,492,641,989,900,000,000,000,000,000,000,000 | 5 | update libwebm to libwebm-1.0.0.27-358-gdbf1d10
changelog:
https://chromium.googlesource.com/webm/libwebm/+log/libwebm-1.0.0.27-351-g9f23fbc..libwebm-1.0.0.27-358-gdbf1d10
Change-Id: I28a6b3ae02a53fb1f2029eee11e9449afb94c8e3 |
*/
static ssize_t bql_show(char *buf, unsigned int value)
{
return sprintf(buf, "%u\n", value); | 0 | [
"CWE-401"
] | linux | 895a5e96dbd6386c8e78e5b78e067dcc67b7f0ab | 19,333,912,245,054,557,000,000,000,000,000,000,000 | 4 | net-sysfs: Fix mem leak in netdev_register_kobject
syzkaller report this:
BUG: memory leak
unreferenced object 0xffff88837a71a500 (size 256):
comm "syz-executor.2", pid 9770, jiffies 4297825125 (age 17.843s)
hex dump (first 32 bytes):
00 00 00 00 ad 4e ad de ff ff ff ff 00 00 00 00 .....N..........
ff ff ... |
static void emit_prologue(u8 **pprog, u32 stack_depth, bool ebpf_from_cbpf,
bool tail_call_reachable, bool is_subprog)
{
u8 *prog = *pprog;
int cnt = X86_PATCH_SIZE;
/* BPF trampoline can be made to work without these nops,
* but let's waste 5 bytes for now and optimize later
*/
memcpy(prog, ideal_nops[NO... | 0 | [
"CWE-77"
] | linux | e4d4d456436bfb2fe412ee2cd489f7658449b098 | 266,257,775,835,923,240,000,000,000,000,000,000,000 | 26 | bpf, x86: Validate computation of branch displacements for x86-64
The branch displacement logic in the BPF JIT compilers for x86 assumes
that, for any generated branch instruction, the distance cannot
increase between optimization passes.
But this assumption can be violated due to how the distances are
computed. Spec... |
static int acpi_register_gsi_pic(struct device *dev, u32 gsi,
int trigger, int polarity)
{
#ifdef CONFIG_PCI
/*
* Make sure all (legacy) PCI IRQs are set as level-triggered.
*/
if (trigger == ACPI_LEVEL_SENSITIVE)
elcr_set_level_irq(gsi);
#endif
return gsi;
} | 0 | [
"CWE-120"
] | linux | dad5ab0db8deac535d03e3fe3d8f2892173fa6a4 | 51,575,410,922,876,260,000,000,000,000,000,000,000 | 13 | x86/acpi: Prevent out of bound access caused by broken ACPI tables
The bus_irq argument of mp_override_legacy_irq() is used as the index into
the isa_irq_to_gsi[] array. The bus_irq argument originates from
ACPI_MADT_TYPE_IO_APIC and ACPI_MADT_TYPE_INTERRUPT items in the ACPI
tables, but is nowhere sanity checked.
Th... |
static int decode_close(struct xdr_stream *xdr, struct nfs_closeres *res)
{
__be32 *p;
int status;
status = decode_op_hdr(xdr, OP_CLOSE);
if (status != -EIO)
nfs_increment_open_seqid(status, res->seqid);
if (status)
return status;
READ_BUF(NFS4_STATEID_SIZE);
COPYMEM(res->stateid.data, NFS4_STATEID_SIZE);
... | 0 | [
"CWE-703"
] | linux | dc0b027dfadfcb8a5504f7d8052754bf8d501ab9 | 152,314,060,355,637,960,000,000,000,000,000,000,000 | 14 | NFSv4: Convert the open and close ops to use fmode
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> |
rpc_C_InitPIN (CK_X_FUNCTION_LIST *self,
p11_rpc_message *msg)
{
CK_SESSION_HANDLE session;
CK_UTF8CHAR_PTR pin;
CK_ULONG pin_len;
BEGIN_CALL (InitPIN);
IN_ULONG (session);
IN_BYTE_ARRAY (pin, pin_len);
PROCESS_CALL ((self, session, pin, pin_len));
END_CALL;
} | 0 | [
"CWE-190"
] | p11-kit | 5307a1d21a50cacd06f471a873a018d23ba4b963 | 209,367,957,757,765,330,000,000,000,000,000,000,000 | 13 | Check for arithmetic overflows before allocating |
int32_t messageTypeStringtoInt(uint8_t messageTypeString[8]) {
if (memcmp(messageTypeString, "Hello ", 8) == 0) {
return MSGTYPE_HELLO;
} else if (memcmp(messageTypeString, "HelloACK", 8) == 0) {
return MSGTYPE_HELLOACK;
} else if (memcmp(messageTypeString, "Commit ", 8) == 0) {
return MSGTYPE_COMMIT;
} el... | 0 | [
"CWE-254",
"CWE-787"
] | bzrtp | bbb1e6e2f467ee4bd7b9a8c800e4f07343d7d99b | 265,170,532,859,117,530,000,000,000,000,000,000,000 | 37 | Add ZRTP Commit packet hvi check on DHPart2 packet reception |
static void statMode(void) {
redisReply *reply;
long aux, requests = 0;
int i = 0;
while(1) {
char buf[64];
int j;
reply = reconnectingRedisCommand(context,"INFO");
if (reply->type == REDIS_REPLY_ERROR) {
printf("ERROR: %s\n", reply->str);
exit(1... | 0 | [
"CWE-119",
"CWE-787"
] | redis | 9fdcc15962f9ff4baebe6fdd947816f43f730d50 | 167,465,197,738,173,580,000,000,000,000,000,000,000 | 85 | Security: fix redis-cli buffer overflow.
Thanks to Fakhri Zulkifli for reporting it.
The fix switched to dynamic allocation, copying the final prompt in the
static buffer only at the end. |
jas_image_t *jpg_decode(jas_stream_t *in, char *optstr)
{
struct jpeg_decompress_struct cinfo;
struct jpeg_error_mgr jerr;
FILE *input_file;
jpg_dest_t dest_mgr_buf;
jpg_dest_t *dest_mgr = &dest_mgr_buf;
JDIMENSION num_scanlines;
jas_image_t *image;
int ret;
jpg_dec_importopts_t opts;
size_t num_samples;
JA... | 0 | [
"CWE-20",
"CWE-190"
] | jasper | d42b2388f7f8e0332c846675133acea151fc557a | 274,702,621,331,872,140,000,000,000,000,000,000,000 | 149 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict ... |
QUtil::setLineBuf(FILE* f)
{
#ifndef _WIN32
setvbuf(f, reinterpret_cast<char *>(NULL), _IOLBF, 0);
#endif
} | 0 | [
"CWE-125"
] | qpdf | 6d46346eb93d5032c08cf1e39023b5d57260a766 | 65,059,424,985,939,160,000,000,000,000,000,000,000 | 6 | Detect integer overflow/underflow |
static inline void check_dl_overrun(struct task_struct *tsk)
{
if (tsk->dl.dl_overrun) {
tsk->dl.dl_overrun = 0;
__group_send_sig_info(SIGXCPU, SEND_SIG_PRIV, tsk);
}
} | 0 | [
"CWE-190"
] | linux | 78c9c4dfbf8c04883941445a195276bb4bb92c76 | 324,067,536,686,791,360,000,000,000,000,000,000,000 | 7 | posix-timers: Sanitize overrun handling
The posix timer overrun handling is broken because the forwarding functions
can return a huge number of overruns which does not fit in an int. As a
consequence timer_getoverrun(2) and siginfo::si_overrun can turn into
random number generators.
The k_clock::timer_forward() callb... |
static int hns_nic_ring_open(struct net_device *netdev, int idx)
{
struct hns_nic_priv *priv = netdev_priv(netdev);
struct hnae_handle *h = priv->ae_handle;
napi_enable(&priv->ring_data[idx].napi);
enable_irq(priv->ring_data[idx].ring->irq);
h->dev->ops->toggle_ring_irq(priv->ring_data[idx].ring, 0);
return 0;... | 0 | [
"CWE-416"
] | linux | 27463ad99f738ed93c7c8b3e2e5bc8c4853a2ff2 | 97,919,418,173,606,060,000,000,000,000,000,000,000 | 12 | net: hns: Fix a skb used after free bug
skb maybe freed in hns_nic_net_xmit_hw() and return NETDEV_TX_OK,
which cause hns_nic_net_xmit to use a freed skb.
BUG: KASAN: use-after-free in hns_nic_net_xmit_hw+0x62c/0x940...
[17659.112635] alloc_debug_processing+0x18c/0x1a0
[17659.117208] __slab_alloc+0x52c/0x... |
gx_default_get_band(gx_device * dev, int y, int *band_start)
{
return 0;
} | 0 | [] | ghostpdl | c9b362ba908ca4b1d7c72663a33229588012d7d9 | 128,942,839,161,320,280,000,000,000,000,000,000,000 | 4 | Bug 699670: disallow copying of the epo device
The erasepage optimisation (epo) subclass device shouldn't be allowed to be
copied because the subclass private data, child and parent pointers end up
being shared between the original device and the copy.
Add an epo_finish_copydevice which NULLs the three offending poin... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.